Module: AuxiliaryRails::ViewHelpers

Defined in:
lib/auxiliary_rails/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_action?(*action_names) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#current_controller?(*ctrl_names) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/auxiliary_rails/view_helpers.rb', line 3

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