lib/aasm/base.rb in aasm-3.3.3 vs lib/aasm/base.rb in aasm-3.4.0

- old
+ new

@@ -53,13 +53,15 @@ @klass.send(:define_method, "may_#{name.to_s}?") do |*args| aasm.may_fire_event?(name, *args) end @klass.send(:define_method, "#{name.to_s}!") do |*args, &block| + aasm.current_event = "#{name.to_s}!".to_sym aasm_fire_event(name, {:persist => true}, *args, &block) end @klass.send(:define_method, "#{name.to_s}") do |*args, &block| + aasm.current_event = name.to_sym aasm_fire_event(name, {:persist => false}, *args, &block) end end def states