<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,7 +8,7 @@ module StateFu
 
         # this adds a before_save hook to ensure that the field is initialized 
         # (and the initial state set) before create.
-        klass.send :before_create, :state_fu!
+        klass.send :before_validation_on_create, :state_fu!
                 
         # it's usually a good idea to do this:
         # validates_presence_of _field_name</diff>
      <filename>lib/persistence/active_record.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>174f9c82274832c80aebbda0549ae86db8891535</id>
    </parent>
  </parents>
  <author>
    <name>davidlee</name>
    <email>david@davelee.com.au</email>
  </author>
  <url>http://github.com/davidlee/state-fu/commit/5dfa696c8a8a308a229bf308155cb6d8e3929f66</url>
  <id>5dfa696c8a8a308a229bf308155cb6d8e3929f66</id>
  <committed-date>2009-10-17T19:14:20-07:00</committed-date>
  <authored-date>2009-10-17T19:14:20-07:00</authored-date>
  <message>Make ActiveRecord::Base set the state field before_validation_on_create (rather than before_create)</message>
  <tree>f850481037d694ff561bcd35f9bde820726b2f1c</tree>
  <committer>
    <name>davidlee</name>
    <email>david@davelee.com.au</email>
  </committer>
</commit>
