Merge pull request #82 from Intrepidd/master

Allow overwriting of events, can be very useful with inheritance
This commit is contained in:
Thorsten Böttger 2013-08-13 03:49:18 -07:00
commit c7a6e965e1
1 changed files with 1 additions and 3 deletions

View File

@ -48,9 +48,7 @@ module AASM
def event(name, options={}, &block)
# @clazz.aasm_event(name, options, &block)
unless @state_machine.events.has_key?(name)
@state_machine.events[name] = AASM::Event.new(name, options, &block)
end
@state_machine.events[name] = AASM::Event.new(name, options, &block)
# an addition over standard aasm so that, before firing an event, you can ask
# may_event? and get back a boolean that tells you whether the guard method