Module: RailsNavigationHelper
- Defined in:
- app/helpers/rails_navigation_helper.rb
Instance Method Summary collapse
Instance Method Details
#matches_page?(conditions) ⇒ Boolean
2 3 4 |
# File 'app/helpers/rails_navigation_helper.rb', line 2 def matches_page?(conditions) ::Matcher.match_multiple_with_or?(controller_name, action_name, params, conditions) end |
#nav_to(name, path, conditions = nil) ⇒ Object
6 7 8 |
# File 'app/helpers/rails_navigation_helper.rb', line 6 def nav_to(name, path, conditions = nil) content_tag :li, link_to(name, path), class: ('active' if matches_page?(conditions)) end |