<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -37,7 +37,7 @@ You can supply a few parameters to fires, two of them are mandatory.
 The rest all fit neatly in an options hash.
 
 - :on =&gt; [ActiveRecord event] 
-  - mandatory. You use it to specify whether you want the event created after a create, update or destroy.
+  - mandatory. You use it to specify whether you want the event created after a create, update or destroy. You can also supply an array of events, e.g. [:create, :update].
 - :actor is your way of specifying who took this action.
   - In the example, post.author is going to be this person.
 - :subject is automatically set to self, which is good most of the time.  You can however override it if you need to, using :subject.</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,13 @@ module TimelineFu
     module ClassMethods
       def fires(event_type, opts)
         raise ArgumentError, &quot;Argument :on is mandatory&quot; unless opts.has_key?(:on)
+
+        # Array provided, set multiple callbacks
+        if opts[:on].kind_of?(Array)
+          opts[:on].each { |on| fires(event_type, opts.merge({:on =&gt; on})) }
+          return
+        end
+
         opts[:subject] = :self unless opts.has_key?(:subject)
 
         method_name = :&quot;fire_#{event_type}_after_#{opts[:on]}&quot;</diff>
      <filename>lib/timeline_fu/fires.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,10 @@ class FiresTest &lt; Test::Unit::TestCase
   
   def test_should_fire_the_appropriate_callback
     @list = List.new(hash_for_list(:author =&gt; @james));
-    TimelineEvent.expects(:create!).with(:actor =&gt; @james, :subject =&gt; @list, :event_type =&gt; 'list_created')
+    TimelineEvent.expects(:create!).with(:actor =&gt; @james, :subject =&gt; @list, :event_type =&gt; 'list_created_or_updated')
+    @list.save
+    TimelineEvent.expects(:create!).with(:actor =&gt; @mat, :subject =&gt; @list, :event_type =&gt; 'list_created_or_updated')
+    @list.author = @mat
     @list.save
   end
 
@@ -61,7 +64,7 @@ class FiresTest &lt; Test::Unit::TestCase
 
   def test_should_set_secondary_subject_to_self_when_requested
     @list = List.new(hash_for_list(:author =&gt; @james));
-    TimelineEvent.stubs(:create!).with(has_entry(:event_type, &quot;list_created&quot;))
+    TimelineEvent.stubs(:create!).with(has_entry(:event_type, &quot;list_created_or_updated&quot;))
     @list.save
     @comment = Comment.new(:body =&gt; 'cool list!', :author =&gt; @mat, :list =&gt; @list)
     TimelineEvent.stubs(:create!).with(has_entry(:event_type, &quot;comment_created&quot;))</diff>
      <filename>test/fires_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -47,8 +47,8 @@ class List &lt; ActiveRecord::Base
   belongs_to :author, :class_name =&gt; &quot;Person&quot;
   has_many :comments
   
-  fires :list_created,  :actor  =&gt; :author, 
-                        :on     =&gt; :create
+  fires :list_created_or_updated,  :actor  =&gt; :author, 
+                                   :on     =&gt; [:create, :update]
 end
 
 class Comment &lt; ActiveRecord::Base</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b6af6a62704a16f1e8a2acb9af94d19c435352e0</id>
    </parent>
  </parents>
  <author>
    <name>Bj&#248;rn Arild M&#230;land</name>
    <email>bjorn.maeland@gmail.com</email>
  </author>
  <url>http://github.com/jamesgolick/timeline_fu/commit/a27bd0b7eaec2e68c120f27d61a05e5ceec12d32</url>
  <id>a27bd0b7eaec2e68c120f27d61a05e5ceec12d32</id>
  <committed-date>2009-06-22T07:21:51-07:00</committed-date>
  <authored-date>2009-06-22T07:21:51-07:00</authored-date>
  <message>Added support for specifying multiple events to fire, e.g. &quot;fires :new_comment, :on =&gt; [:create, :update]&quot;</message>
  <tree>0a7d74ada5bc0a42f392b50d145e78e11d8ea7e2</tree>
  <committer>
    <name>Bj&#248;rn Arild M&#230;land</name>
    <email>bjorn.maeland@gmail.com</email>
  </committer>
</commit>
