<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/builders/builder_test.rb</filename>
    </added>
    <added>
      <filename>test/builders/tabs_builder_test.rb</filename>
    </added>
    <added>
      <filename>test/fixtures/mixin/default.html.erb</filename>
    </added>
    <added>
      <filename>test/fixtures/mixin/with_open_close_tabs.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,11 @@
 = Changelog
 
 
+== next mini
+
+* ADDED: Ability to pass arbitrary options to open_tabs and close_tags method. Thanks to aaronchi (closes #315)
+
+
 == Release 0.8.2
 
 * CHANGED: GitHub Gem Building is Defunct. The gem is now hosted on Gemcutter (see http://github.com/blog/515-gem-building-is-defunct)</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -84,6 +84,22 @@ Use the &lt;tt&gt;current_tab&lt;/tt&gt; helper method if you need to access the value of cu
   # In your view
   &lt;p&gt;The name of current tab is &lt;%= current_tab %&gt;.&lt;/p&gt;
 
+The open tag can be customized with the `:open_tabs` option. 
+
+  &lt;% tabs_tag :open_tabs =&gt; { :id =&gt; &quot;tabs&quot;, :class =&gt; &quot;cool&quot; } do |tab| %&gt;
+    &lt;%= tab.home      'Homepage', root_path %&gt;
+    &lt;%= tab.dashboard 'Dashboard', dashboard_path %&gt;
+    &lt;%= tab.account   'Account', account_path %&gt;
+  &lt;% end %&gt;
+
+  &lt;ul id=&quot;tabs&quot; class=&quot;cool&quot;&gt;
+    &lt;li&gt;&lt;a href=&quot;/&quot;&gt;Homepage&lt;/a&gt;&lt;/li&gt;
+    &lt;li&gt;&lt;a href=&quot;/dashboard&quot;&gt;Dashboard&lt;/a&gt;&lt;/li&gt;
+    &lt;li&gt;&lt;a href=&quot;/account&quot;&gt;Account&lt;/a&gt;&lt;/li&gt;
+  &lt;/ul&gt;
+
+Further customizations require a custom Builder (see below).
+
 
 == Restricting set_tab scope
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -115,6 +115,10 @@ module TabsOnRails
 
       def tabs_tag(options = {}, &amp;block)
         raise LocalJumpError, &quot;no block given&quot; unless block_given?
+        
+        options = options.dup
+        open_tabs_options  = options.delete(:open_tabs)  || {}
+        close_tabs_options = options.delete(:close_tabs) || {}
 
         unless options.is_a?(Hash)
           ActiveSupport::Deprecation.warn('tabs_tag takes a Hash of options, no longer a builder class. Use :builder =&gt; BuilderClass.', caller)
@@ -122,9 +126,9 @@ module TabsOnRails
         end
         tabs  = Tabs.new(self, { :namespace =&gt; :default }.merge(options))
 
-        concat(tabs.open_tabs.to_s)
+        concat(tabs.open_tabs(open_tabs_options).to_s)
         yield  tabs
-        concat(tabs.close_tabs.to_s)
+        concat(tabs.close_tabs(close_tabs_options).to_s)
       end
 
     end</diff>
      <filename>lib/tabs_on_rails/controller_mixin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -67,11 +67,11 @@ module TabsOnRails
       end
       
       # Overwrite this method to use a custom open tag for your tabs.
-      def open_tabs
+      def open_tabs(*args)
       end
       
       # Overwrite this method to use a custom close tag for your tabs.
-      def close_tabs
+      def close_tabs(*args)
       end
       
     end
@@ -83,7 +83,7 @@ module TabsOnRails
     # It creates a new tab
     #
     class TabsBuilder &lt; Builder
-      
+
       # Implements Builder#tab_for.
       # Returns a link_to +tab+ with +name+ and +options+ if +tab+ is not the current tab,
       # a simple tab name wrapped by a span tag otherwise.
@@ -104,13 +104,34 @@ module TabsOnRails
       end
       
       # Implements Builder#open_tabs.
-      def open_tabs
-        '&lt;ul&gt;'
+      # 
+      # Returns an unordered list open tag.
+      # The &lt;tt&gt;options&lt;/tt&gt; is used to customize the HTML attributes of the tag.
+      #
+      #   open_tag
+      #   # =&gt; &quot;&lt;ul&gt;&quot;
+      #
+      #   open_tag :class =&gt; &quot;centered&quot;
+      #   # =&gt; &quot;&lt;ul class=\&quot;centered\&quot;&gt;&quot;
+      #
+      def open_tabs(options = {})
+        @context.tag(&quot;ul&quot;, options, open = true)
       end
       
       # Implements Builder#close_tabs.
-      def close_tabs
-        '&lt;/ul&gt;'
+      # 
+      # Returns an unordered list close tag.
+      # The &lt;tt&gt;options&lt;/tt&gt; hash is ignored. It exists only for 
+      # coeherence with the parent Builder API.
+      #
+      #   close_tag
+      #   # =&gt; &quot;&lt;/ul&gt;&quot;
+      #
+      #   close_tag :class =&gt; &quot;centered&quot;
+      #   # =&gt; &quot;&lt;/ul&gt;&quot;
+      #
+      def close_tabs(options = {})
+        &quot;&lt;/ul&gt;&quot;
       end
       
     end
@@ -122,8 +143,8 @@ module TabsOnRails
     end
     
     %w(open_tabs close_tabs).each do |method|
-      define_method(method) do
-        @builder.send(method)
+      define_method(method) do |*args|
+        @builder.send(method, *args)
       end
     end
     </diff>
      <filename>lib/tabs_on_rails/tabs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,13 +23,13 @@ class NilBoundariesBuilder &lt; TabsOnRails::Tabs::Builder
 end
 
 class NilOpenBoundaryBuilder &lt; NilBoundariesBuilder
-  def close_tabs
+  def close_tabs(options = {})
     '&lt;br /&gt;'
   end
 end
 
 class NilCloseBoundaryBuilder &lt; NilBoundariesBuilder
-  def open_tabs
+  def open_tabs(options = {})
     '&lt;br /&gt;'
   end
 end
@@ -57,8 +57,8 @@ class ControllerMixinHelpersTest &lt; ActionView::TestCase
       assert_equal(:custom, builder.instance_variable_get(:'@namespace'))
     end
   end
-
-
+  
+  
   def test_tabs_tag_should_not_concat_open_close_tabs_when_nil
     content = tabs_tag(:builder =&gt; NilBoundariesBuilder) do |t| 
       concat t.single('Single', '#')</diff>
      <filename>test/controller_mixin_helpers_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ class ControllerMixinWithControllerTest &lt; ActionController::TestCase
 
     def method_missing(method, *args)
       if method =~ /^action_(.*)/
-        render :action =&gt; (params[:template] || 'standard')
+        render :action =&gt; (params[:template] || 'default')
       end
     end
 
@@ -33,6 +33,23 @@ class ControllerMixinWithControllerTest &lt; ActionController::TestCase
   end
 
 
+  def test_render_default
+    get :action_dashboard
+    assert_equal(%Q{&lt;ul&gt;
+  &lt;li&gt;&lt;span&gt;Dashboard&lt;/span&gt;&lt;/li&gt;
+  &lt;li&gt;&lt;a href=&quot;/w&quot;&gt;Welcome&lt;/a&gt;&lt;/li&gt;
+&lt;/ul&gt;}, @response.body)
+  end
+
+  def test_render_with_open_close_tabs
+    get :action_dashboard, :template =&gt; &quot;with_open_close_tabs&quot;
+    assert_equal(%Q{&lt;ul id=&quot;tabs&quot;&gt;
+  &lt;li&gt;&lt;span&gt;Dashboard&lt;/span&gt;&lt;/li&gt;
+  &lt;li&gt;&lt;a href=&quot;/w&quot;&gt;Welcome&lt;/a&gt;&lt;/li&gt;
+&lt;/ul&gt;}, @response.body)
+  end
+
+
   def test_set_tab
     get :action_dashboard
     assert_equal(:dashboard, controller.current_tab)
@@ -64,6 +81,7 @@ class ControllerMixinWithControllerTest &lt; ActionController::TestCase
 &lt;/ul&gt;}, @response.body)
   end
 
+
   def test_current_tab
     get :action_dashboard
     assert_equal :dashboard, controller.current_tab</diff>
      <filename>test/controller_mixin_with_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/builder_test.rb</filename>
    </removed>
    <removed>
      <filename>test/fixtures/mixin/standard.html.erb</filename>
    </removed>
    <removed>
      <filename>test/tabs_builder_test.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>4620a00a665b5afd089a3bde564a96a9d8968de8</id>
    </parent>
  </parents>
  <author>
    <name>Simone Carletti</name>
    <email>weppos@weppos.net</email>
  </author>
  <url>http://github.com/weppos/tabs_on_rails/commit/6d1c197ba8ba87b6f38d7a8deb7f4fe4889cfe66</url>
  <id>6d1c197ba8ba87b6f38d7a8deb7f4fe4889cfe66</id>
  <committed-date>2009-10-28T11:31:21-07:00</committed-date>
  <authored-date>2009-10-28T11:31:21-07:00</authored-date>
  <message>Added ability to pass arbitrary options to open_tabs and close_tags method. Thanks to aaronchi (closes #315)</message>
  <tree>36357d9239d6414c1c00a9385ca47b8d68da42f9</tree>
  <committer>
    <name>Simone Carletti</name>
    <email>weppos@weppos.net</email>
  </committer>
</commit>
