<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/functional/conversation_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-Copyright (c) 2006 Scott Barron
+Copyright (c) 2008 Scott Barron
 
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the</diff>
      <filename>MIT-LICENSE</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,6 @@ rescue Exception
   nil
 end
 
-# Version
 if `ruby -Ilib -rversion -e &quot;print AASM::VERSION::STRING&quot;` =~ /([0-9.]+)$/
   CURRENT_VERSION = $1
 else</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,6 @@ Before Next Release:
 * Add automatic persistence hooks for ActiveRecord classes
 * Add #aasm_next_state_for_event
 * Add #aasm_next_states_for_event
-* Add .states
 
 
 Cool ideas from users:</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,7 @@ module AASM
     alias :initial_state :aasm_initial_state=
     
     def state(name, options={})
+      aasm_states &lt;&lt; name unless aasm_states.include?(name)
       self.aasm_initial_state = name unless self.aasm_initial_state
 
       define_method(&quot;#{name.to_s}?&quot;) do
@@ -28,7 +29,9 @@ module AASM
     end
     
     def event(name, &amp;block)
-      aasm_events[name] = AASM::SupportingClasses::Event.new(name, &amp;block)
+      unless aasm_events.has_key?(name)
+        aasm_events[name] = AASM::SupportingClasses::Event.new(name, &amp;block)
+      end
 
       define_method(&quot;#{name.to_s}!&quot;) do
         new_state = self.class.aasm_events[name].fire(self)
@@ -41,6 +44,10 @@ module AASM
       end
     end
 
+    def aasm_states
+      @aasm_states ||= []
+    end
+
     def aasm_events
       @aasm_events ||= {}
     end</diff>
      <filename>lib/aasm.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>543ac695fd7c1637e5a6b53caf866f226ef99c85</id>
    </parent>
  </parents>
  <author>
    <name>Scott Barron</name>
    <email>scott@elitists.net</email>
  </author>
  <url>http://github.com/eric/aasm/commit/551503d12f14e99ad12e2faf3e6464f619d860a5</url>
  <id>551503d12f14e99ad12e2faf3e6464f619d860a5</id>
  <committed-date>2008-02-21T09:54:42-08:00</committed-date>
  <authored-date>2008-02-21T09:54:42-08:00</authored-date>
  <message>Add .aasm_states method to get a list of all states for a class</message>
  <tree>bba75a4f20f5f7211a0e65e6a30d98fd73653acc</tree>
  <committer>
    <name>Scott Barron</name>
    <email>scott@elitists.net</email>
  </committer>
</commit>
