Module: Admini::ApplicationHelper
- Includes:
- ActionView::Helpers::FormOptionsHelper, ActionView::Helpers::TranslationHelper, ActiveSupport::Multibyte::Unicode
- Defined in:
- app/helpers/admini/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#enable_action?(action) ⇒ Boolean
7 8 9 |
# File 'app/helpers/admini/application_helper.rb', line 7 def enable_action?(action) routes.include?(controller: controller_path, action: action.to_s) end |
#search_options ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/helpers/admini/application_helper.rb', line 11 def = [] search_attributes.each do |attribute| << [t("activerecord.attributes.#{resource_name}.#{attribute}", default: attribute.to_s.camelize), attribute] end () end |