dm-is-persistent_state_machine 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
@@ -92,7 +92,7 @@ module DataMapper
|
|
92
92
|
property :state_id, Integer, :required => true, :min => 1
|
93
93
|
belongs_to :state
|
94
94
|
|
95
|
-
has n, Extlib::Inflection.pluralize(target_model_name+"StateChange").to_sym
|
95
|
+
has n, Extlib::Inflection.pluralize(target_model_name+"StateChange").snake_case.to_sym
|
96
96
|
|
97
97
|
# generate a FooState class that is derived from State
|
98
98
|
state_model = Object.full_const_set(self.to_s+"State", Class.new(State))
|
@@ -36,6 +36,7 @@ describe DataMapper::Is::PersistentStateMachine do
|
|
36
36
|
ProjectStateChange.count.should == 0
|
37
37
|
@project.state.code.should == "reviewed"
|
38
38
|
@project.save
|
39
|
+
@project.project_state_changes.length.should == 1
|
39
40
|
ProjectStateChange.count.should == 1
|
40
41
|
ProjectStateChange.first.user.name.should == "John Doe"
|
41
42
|
ProjectStateChange.first.project.should == @project
|