Remove I18n.translation_present? monkey patch

This commit is contained in:
Sebastian Serth
2022-12-04 15:03:28 +01:00
parent fe24e7d890
commit ffe96d9223
4 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,7 @@
- root_element = link_to_if(current_user && policy(model).index?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
- if 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.exists?("shared.#{params[:action]}")
- active_action = t("shared.#{params[:action]}", model: model&.model_name&.human)
- else
- active_action = t("#{controller_name}.index.#{params[:action]}", model: model&.model_name&.human)