Module: SimpleNavigation::ControllerMethods::ClassMethods

Defined in:
lib/simple_navigation/controller_methods.rb

Instance Method Summary collapse

Instance Method Details

Sets the active navigation for all actions in this controller.

The specified symbols must match the keys for your navigation items in your config/navigation.rb file.



52
53
54
55
56
57
58
59
# File 'lib/simple_navigation/controller_methods.rb', line 52

def navigation(primary_navigation, sub_navigation=nil)
  self.class_eval do
    define_method :set_navigation do
      current_navigation(primary_navigation, sub_navigation)
    end
    before_filter :set_navigation
  end
end