module Interage::ControllerActiveHelper
Constants
- HTML_ACTIVE_CLASS
- HTML_SHOW_CLASS
Public Instance Methods
action_class_active(*actions)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 28 def action_class_active(*actions) HTML_ACTIVE_CLASS if current_action?(*actions) end
controller_class_active(*controllers)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 14 def controller_class_active(*controllers) HTML_ACTIVE_CLASS if current_controller?(*controllers) end
Also aliased as: menu_active
controller_class_active_show(*controllers)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 8 def controller_class_active_show(*controllers) return unless current_controller?(*controllers) "#{HTML_SHOW_CLASS} #{HTML_ACTIVE_CLASS}" end
controller_class_show(*controllers)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 19 def controller_class_show(*controllers) HTML_SHOW_CLASS if current_controller?(*controllers) end
Also aliased as: menu_class_show
current_action?(*actions)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 32 def current_action?(*actions) Array.wrap(actions).include?("#{controller_name}/#{action_name}") end
current_controller?(*controllers)
click to toggle source
# File lib/interage/controller_active_helper.rb, line 24 def current_controller?(*controllers) Array.wrap(controllers).include?(params[:controller]) end