Method: Olivander::ApplicationHelper#resource_form_action_icon
- Defined in:
- app/helpers/olivander/application_helper.rb
#resource_form_action_icon(resource, action) ⇒ Object
105 106 107 108 109 110 111 112 113 |
# File 'app/helpers/olivander/application_helper.rb', line 105 def resource_form_action_icon(resource, action) key = resource.class.name.underscore if I18n.exists?("activerecord.actions.#{key}.#{action}-icon") return O18n.t("activerecord.actions.#{key}.#{action}-icon") end return O18n.t("activerecord.actions.#{action}-icon") if I18n.exists?("activerecord.actions.#{action}-icon") action.to_s.titleize end |