Module: Tabnav::Helper

Defined in:
lib/tabnav/helper.rb

Instance Method Summary collapse

Instance Method Details

#render_tabnav(options = {}) {|n| ... } ⇒ Object

This is the main method to be used in your views. It creates and yields a new instance of Navbar.

options is an optional hash of options that are passed to the navbar, and and used to create the ul.

Finally, this renders the navbar, and concats the result into the view.

Yields:

  • (n)


11
12
13
14
15
# File 'lib/tabnav/helper.rb', line 11

def render_tabnav(options = {})
  n = Navbar.new(self, params, options)
  yield(n)
  concat( n.render )
end