<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -17,8 +17,8 @@ module DefV
       case arguments
       when String
         @title = arguments
-        css_class = 'error' if options[:error]
-        return content_tag(:h1, [options[:header], @title, options[:trailer]].compact.join(' '), :class =&gt; css_class)
+        options[:class] = [options[:class], 'error'].compact.join(' ') if options[:error]
+        return content_tag(:h1, [options[:header], @title, options[:trailer]].compact.join(' '), options.except(:error, :header, :trailer))
       when Hash
         sitename = arguments[:site_name]
         if @title</diff>
      <filename>lib/title_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,4 +26,20 @@ class TitleHelperTest &lt; Test::Unit::TestCase
   def test_error_on_h1
     assert_equal &quot;&lt;h1 class=\&quot;error\&quot;&gt;This is wrong&lt;/h1&gt;&quot;, @helper.title(&quot;This is wrong&quot;, :error =&gt; true)
   end
+  
+  def test_class_on_h1
+    assert_equal &quot;&lt;h1 class=\&quot;my-class\&quot;&gt;Header with class&lt;/h1&gt;&quot;, @helper.title(&quot;Header with class&quot;, :class =&gt; 'my-class')
+  end
+  
+  def test_id_on_h1
+    assert_equal &quot;&lt;h1 id=\&quot;my-id\&quot;&gt;Header with id&lt;/h1&gt;&quot;, @helper.title(&quot;Header with id&quot;, :id =&gt; 'my-id')
+  end
+  
+  def test_class_and_id_on_h1
+    assert_equal &quot;&lt;h1 class=\&quot;my-class\&quot; id=\&quot;my-id\&quot;&gt;Header with class and id&lt;/h1&gt;&quot;, @helper.title(&quot;Header with class and id&quot;, :class =&gt; 'my-class', :id =&gt; 'my-id')
+  end
+  
+  def test_class_and_error_on_h1
+    assert_equal &quot;&lt;h1 class=\&quot;my-class error\&quot;&gt;Header with error and class&lt;/h1&gt;&quot;, @helper.title(&quot;Header with error and class&quot;, :class =&gt; 'my-class', :error =&gt; true)
+  end
 end</diff>
      <filename>test/title_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>308dec78383716094a4097717ed4f026f76f4eee</id>
    </parent>
  </parents>
  <author>
    <name>Mikael Hallendal</name>
    <email>micke@imendio.com</email>
  </author>
  <url>http://github.com/DefV/title_helper/commit/e7cf2226353c5fa1d289143a8bead04fafc24bea</url>
  <id>e7cf2226353c5fa1d289143a8bead04fafc24bea</id>
  <committed-date>2008-06-16T03:48:14-07:00</committed-date>
  <authored-date>2008-06-16T03:48:14-07:00</authored-date>
  <message>Added support to give :class and :id when creating a view title.

The title function now accepts :class and :id options to set the
corresponding attributes on the created
h1 tag.

If both error and class is given to the title function the class will be
merged with error.

Signed-off-by: Jan De Poorter &lt;jan@defv.be&gt;</message>
  <tree>6a25d327587603b0838796454080a86842b8d93b</tree>
  <committer>
    <name>Jan De Poorter</name>
    <email>jan@defv.be</email>
  </committer>
</commit>
