Module: Navigation::Helpers
- Defined in:
- lib/navigation.rb
Instance Method Summary collapse
-
#navigation(key, options = {}) ⇒ Object
renders the navigation identified by the passed in name/key.
Instance Method Details
#navigation(key, options = {}) ⇒ Object
renders the navigation identified by the passed in name/key
Ex:
<%= navigation :primary %>
25 26 27 28 29 30 31 |
# File 'lib/navigation.rb', line 25 def (key, = {}) .merge!(:view => self) navigator = Navigator.new(key, ) if navigator.allowed? content_tag(:ul, navigator.links.join("\n").html_safe, .merge!(:class => navigator.css_class)) end end |