Skip to content

Commit

Permalink
Allow overwriting of events, can be very useful with inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Siami committed Aug 7, 2013
1 parent e6229e3 commit 32c1c96
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/aasm/base.rb
Expand Up @@ -48,9 +48,7 @@ def state(name, options={})
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
Expand Down

0 comments on commit 32c1c96

Please sign in to comment.