aasm 3.0.21 → 3.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.0.22
4
+
5
+ * fixed [issue 88](https://github.com/aasm/aasm/issues/88): wrong number of arguments for transaction method
6
+
3
7
  ## 3.0.21
4
8
 
5
9
  * support nested ActiveRecord transactions ([@ozeias](https://github.com/ozeias))
data/README.md CHANGED
@@ -239,6 +239,21 @@ class Job < ActiveRecord::Base
239
239
  end
240
240
  ```
241
241
 
242
+ ### Mongoid
243
+
244
+ AASM also supports persistence to Mongodb if you're using Mongoid. Make sure
245
+ to include Mongoid::Document before you include AASM.
246
+
247
+ ```ruby
248
+ class Job
249
+ include Mongoid::Document
250
+ include AASM
251
+ aasm do
252
+ ...
253
+ end
254
+ end
255
+ ```
256
+
242
257
  ### Automatic Scopes
243
258
 
244
259
  AASM will automatically create scope methods for each state in the model.
@@ -290,6 +305,7 @@ end
290
305
 
291
306
  Since version *3.0.13* AASM supports ActiveRecord transactions. So whenever a transition
292
307
  callback or the state update fails, all changes to any database record are rolled back.
308
+ Mongodb does not support transactions.
293
309
 
294
310
  ### Column name & migration
295
311
 
@@ -132,7 +132,7 @@ module AASM
132
132
  end
133
133
 
134
134
  def aasm_fire_event(name, options, *args)
135
- transaction(:requires_new => true) do
135
+ self.class.transaction(:requires_new => true) do
136
136
  super
137
137
  end
138
138
  end
@@ -1,3 +1,3 @@
1
1
  module AASM
2
- VERSION = "3.0.21"
2
+ VERSION = "3.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aasm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.21
4
+ version: 3.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-08-27 00:00:00.000000000 Z
15
+ date: 2013-08-31 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
19
- requirement: &70183071498180 !ruby/object:Gem::Requirement
19
+ requirement: &70096173850320 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - =
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 3.2.12
25
25
  type: :development
26
26
  prerelease: false
27
- version_requirements: *70183071498180
27
+ version_requirements: *70096173850320
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mongoid
30
- requirement: &70183071497520 !ruby/object:Gem::Requirement
30
+ requirement: &70096173849660 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ! '>='
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *70183071497520
38
+ version_requirements: *70096173849660
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rake
41
- requirement: &70183071497060 !ruby/object:Gem::Requirement
41
+ requirement: &70096173849200 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -46,10 +46,10 @@ dependencies:
46
46
  version: '0'
47
47
  type: :development
48
48
  prerelease: false
49
- version_requirements: *70183071497060
49
+ version_requirements: *70096173849200
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: sdoc
52
- requirement: &70183071496640 !ruby/object:Gem::Requirement
52
+ requirement: &70096173848780 !ruby/object:Gem::Requirement
53
53
  none: false
54
54
  requirements:
55
55
  - - ! '>='
@@ -57,10 +57,10 @@ dependencies:
57
57
  version: '0'
58
58
  type: :development
59
59
  prerelease: false
60
- version_requirements: *70183071496640
60
+ version_requirements: *70096173848780
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
- requirement: &70183071496140 !ruby/object:Gem::Requirement
63
+ requirement: &70096173848280 !ruby/object:Gem::Requirement
64
64
  none: false
65
65
  requirements:
66
66
  - - ~>
@@ -68,10 +68,10 @@ dependencies:
68
68
  version: '2.0'
69
69
  type: :development
70
70
  prerelease: false
71
- version_requirements: *70183071496140
71
+ version_requirements: *70096173848280
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: rr
74
- requirement: &70183071495720 !ruby/object:Gem::Requirement
74
+ requirement: &70096173847860 !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
77
  - - ! '>='
@@ -79,10 +79,10 @@ dependencies:
79
79
  version: '0'
80
80
  type: :development
81
81
  prerelease: false
82
- version_requirements: *70183071495720
82
+ version_requirements: *70096173847860
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sqlite3
85
- requirement: &70183071495260 !ruby/object:Gem::Requirement
85
+ requirement: &70096173847400 !ruby/object:Gem::Requirement
86
86
  none: false
87
87
  requirements:
88
88
  - - ! '>='
@@ -90,10 +90,10 @@ dependencies:
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
- version_requirements: *70183071495260
93
+ version_requirements: *70096173847400
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: minitest
96
- requirement: &70183071494840 !ruby/object:Gem::Requirement
96
+ requirement: &70096173382180 !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements:
99
99
  - - ! '>='
@@ -101,10 +101,10 @@ dependencies:
101
101
  version: '0'
102
102
  type: :development
103
103
  prerelease: false
104
- version_requirements: *70183071494840
104
+ version_requirements: *70096173382180
105
105
  - !ruby/object:Gem::Dependency
106
106
  name: ruby-debug-completion
107
- requirement: &70183071494420 !ruby/object:Gem::Requirement
107
+ requirement: &70096173381240 !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
110
110
  - - ! '>='
@@ -112,10 +112,10 @@ dependencies:
112
112
  version: '0'
113
113
  type: :development
114
114
  prerelease: false
115
- version_requirements: *70183071494420
115
+ version_requirements: *70096173381240
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: coveralls
118
- requirement: &70183071494000 !ruby/object:Gem::Requirement
118
+ requirement: &70096173380220 !ruby/object:Gem::Requirement
119
119
  none: false
120
120
  requirements:
121
121
  - - ! '>='
@@ -123,7 +123,7 @@ dependencies:
123
123
  version: '0'
124
124
  type: :development
125
125
  prerelease: false
126
- version_requirements: *70183071494000
126
+ version_requirements: *70096173380220
127
127
  description: AASM is a continuation of the acts as state machine rails plugin, built
128
128
  for plain Ruby objects.
129
129
  email: scott@elitists.net, ttilley@gmail.com, aasm@mt7.de