runcoderun-aasm 2.0.2.3 → 2.0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/aasm.rb +5 -5
- metadata +1 -1
data/lib/aasm.rb
CHANGED
@@ -5,7 +5,7 @@ require File.join(File.dirname(__FILE__), 'persistence')
|
|
5
5
|
|
6
6
|
module AASM
|
7
7
|
def self.Version
|
8
|
-
'2.0.2.
|
8
|
+
'2.0.2.4'
|
9
9
|
end
|
10
10
|
|
11
11
|
class InvalidTransition < RuntimeError
|
@@ -126,16 +126,16 @@ module AASM
|
|
126
126
|
new_state = self.class.aasm_events[name].fire(self, *args)
|
127
127
|
|
128
128
|
unless new_state.nil?
|
129
|
-
aasm_state_object_for_state(new_state).call_action(:enter, self)
|
130
|
-
|
131
129
|
persist_successful = true
|
132
130
|
if persist
|
133
131
|
persist_successful = set_aasm_current_state_with_persistence(new_state)
|
134
|
-
self.class.aasm_events[name].execute_success_callback(self) if persist_successful
|
135
132
|
else
|
136
133
|
self.aasm_current_state = new_state
|
137
|
-
self.class.aasm_events[name].execute_success_callback(self)
|
138
134
|
end
|
135
|
+
|
136
|
+
self.class.aasm_events[name].execute_success_callback(self) if persist_successful
|
137
|
+
|
138
|
+
aasm_state_object_for_state(new_state).call_action(:enter, self)
|
139
139
|
|
140
140
|
if persist_successful
|
141
141
|
self.aasm_event_fired(self.aasm_current_state, new_state) if self.respond_to?(:aasm_event_fired)
|