Module: AuxiliaryRails::ViewHelpers

Includes:
DisplayHelper
Defined in:
lib/auxiliary_rails/view_helpers.rb,
lib/auxiliary_rails/view_helpers/display_helper.rb

Defined Under Namespace

Modules: DisplayHelper

Constant Summary

Constants included from DisplayHelper

DisplayHelper::DISPLAY_NAME_METHODS

Instance Method Summary collapse

Methods included from DisplayHelper

#display_name

Instance Method Details

#current_action?(*action_names) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/auxiliary_rails/view_helpers.rb', line 11

def current_action?(*action_names)
  action_names.include?(params[:action])
end

#current_controller?(*ctrl_names) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/auxiliary_rails/view_helpers.rb', line 7

def current_controller?(*ctrl_names)
  ctrl_names.include?(params[:controller])
end