This tag allows you to easily use jQuery-UI tabs

  <first:>tab 1 content</first:>
  <tab2:>tab 2 content</tab2:>

If you don’t specify any attributes to the parameters, the parameter name is used for the tab name and ID. You can adjust this behaviour by specifying attributes to your parameters:

  <tab1: name="1" id="id1">tab 1 content</tab1:>

If you specify an href rather than an id, the tab content is loaded dynamically:

  <remote: href="/front/hello"/>

Attributes are passed through to jQuery-UI, so options and events defined in the jQuery-ui tabs documentation may be used:

<tabs collapsible selected="2">


Note that tabs supports attributes both on the tabs tag as well as on the parameters.

The parameters support three attributes: id, name, href, described above.

The tabs tag supports all options and events supported in jQuery-UI, plus one additional attribute:

  • sortable: if set, the tabs are sortable rather than fixed.


Usage of Ruby 1.8 will result in an undefined tab order. Ruby 1.9 is recommended.

Show Source

Edit this page