Module: TabsOnRails::ControllerMixin::ClassMethods

Defined in:
lib/tabs_on_rails/controller_mixin.rb

Instance Method Summary collapse

Instance Method Details

#current_tab(name, options = {}) ⇒ Object

Sets name as current_tab.

Examples

tab :foo
tab :foo, :except => :new
tab :foo, :only => [ :index, :show ]


40
41
42
43
44
# File 'lib/tabs_on_rails/controller_mixin.rb', line 40

def current_tab(name, options = {})
  before_filter(options) do |controller|
    controller.current_tab = name
  end
end