title: Rails3 ActiveRecord Transactions after_commit on multiple actions
body: <p>According to <a href="https://github.com/rails/rails/blob/9d2146ac6e4c1fdc9cc157d614b1eb9968ac6a2e/activerecord/lib/active_record/transactions.rb#L221" rel="nofollow">the documentation</a> I can define the same method to be executed after a commit of type create or update:</p>
  
  <pre><code>after_commit :do_foo_bar, :on [:create, :update]
  </code></pre>
  
  <p>Well, this code results in a parsing error for me:</p>
  
  <blockquote>
    <p>can't convert Symbol into Integer</p>
  </blockquote>
  
  <p>I then change it to this:</p>
  
  <pre><code>after_commit :do_foo_bar, :on =&gt; [:create, :update]
  </code></pre>
  
  <p>I get no errors, but nothing happens! Further investigation at the logs show me a silent and strange error:</p>
  
  <pre><code>/home/nuno/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:404: syntax error, unexpected '[', expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
  ...(transaction_include_action?(:[:create, :update]))
  ...                               ^
  /home/nuno/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:412: syntax error, unexpected keyword_end, expecting ')'
  /home/nuno/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:413: syntax error, unexpected $end, expecting ')'
  Redirected to http://localhost:3000/people/1
  Completed 302 Found in 7491ms (ActiveRecord: 410.6ms)
  </code></pre>
  
  <p>How can I properly do this?</p>