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 symbol must match the keys for your navigation items in your config/navigation.rb file.



58
59
60
61
62
63
64
65
# File 'lib/simple_navigation/controller_methods.rb', line 58

def navigation(*args)
  self.class_eval do
    define_method :sn_set_navigation do
      current_navigation(*args)
    end
    before_filter :sn_set_navigation
  end
end