lib/aasm/aasm.rb in aasm-3.3.1 vs lib/aasm/aasm.rb in aasm-3.3.2
- old
+ new
@@ -153,20 +153,20 @@
# new event before callback
event.fire_callbacks(:before, self)
if new_state_name = event.fire(self, *args)
- fired(event, old_state, new_state_name, options, &block)
+ aasm_fired(event, old_state, new_state_name, options, &block)
else
- failed(event_name, old_state)
+ aasm_failed(event_name, old_state)
end
rescue StandardError => e
event.fire_callbacks(:error, self, e) || raise(e)
end
end
- def fired(event, old_state, new_state_name, options)
+ def aasm_fired(event, old_state, new_state_name, options)
persist = options[:persist]
new_state = aasm.state_object_for_name(new_state_name)
# new before_ callbacks
@@ -198,10 +198,10 @@
end
persist_successful
end
- def failed(event_name, old_state)
+ def aasm_failed(event_name, old_state)
if self.respond_to?(:aasm_event_failed)
self.aasm_event_failed(event_name, old_state.name)
end
if AASM::StateMachine[self.class].config.whiny_transitions