Add model name to breadcrumbs in case of validation errors
This commit is contained in:
@ -9,11 +9,11 @@
|
|||||||
- if object
|
- if object
|
||||||
- current_element = link_to_if(@current_user && policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
- current_element = link_to_if(@current_user && policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
||||||
- if I18n.translation_present?("shared.#{params[:action]}")
|
- if I18n.translation_present?("shared.#{params[:action]}")
|
||||||
- active_action = t("shared.#{params[:action]}")
|
- active_action = t("shared.#{params[:action]}", model: model.model_name.human)
|
||||||
- else
|
- else
|
||||||
- active_action = t("#{controller_name}.index.#{params[:action]}")
|
- active_action = t("#{controller_name}.index.#{params[:action]}", model: model.model_name.human)
|
||||||
- else
|
- else
|
||||||
- active_action = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
- active_action = t("breadcrumbs.#{controller_name}.#{params[:action]}", model: model.model_name.human)
|
||||||
|
|
||||||
|
|
||||||
- title = "#{active_action} - #{application_name}"
|
- title = "#{active_action} - #{application_name}"
|
||||||
|
Reference in New Issue
Block a user