acts_as_living 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73d33885449af7caca352c2349ec8bb1897f01b6b3d6906b8dd414d4dda6d6c9
4
- data.tar.gz: e8fc368946103d716e0c84132f9f84662f21ddbf392237de7f2309801c8f0f9b
3
+ metadata.gz: 12b6a909f4824398a5021fc625010ea556647fcb0997b74f4e62b2783be69305
4
+ data.tar.gz: 7c8b6524858879dcc73fac600f0aa50530302eb7ade4c17a4d4f6af9b284dd85
5
5
  SHA512:
6
- metadata.gz: 5fca0d7f19165ac60768f58cb92c29f516b7746a8078fcadfb13176d5b7899d3a5acfe8018f638a0ea31256e89cbc24075aee378f4df5f33a0e9c7365612d05e
7
- data.tar.gz: 07e876c5194830496f4bccbd9a6e849e59d102bc7607105152acbe01e197a6978f0194a2c1071f797a5b130bfb8e2ea5b6eda041d2ba2df863e50063382b3d73
6
+ metadata.gz: 23499a06971844d813f54856a6b987d734d7ce6a9545d81226a8ad4e68e73da1375b91fe6741509fbeb282c05b02a1b78f5e8ee9b631557f4c59aa3ff3919a9d
7
+ data.tar.gz: b1d2d9c72c27cf11ad9f956f141e235068777f9878cb77bfd12d2452d3cbae4bbb0723e4ce8ad33190cbddaddac690bd765c49d6367fb134f53f44b24c0ce1ee
@@ -6,7 +6,7 @@ module ActsAsLiving::ValidationsDefiner
6
6
  validates :stage, presence: true
7
7
 
8
8
  validate :stage_progression, on: :update, if: :stage_changed?
9
- validate :initialized_stage, on: :create, if: :stage_changed?
9
+ validate :stage_is_first_stage, on: :create, if: :stage_changed?
10
10
  end
11
11
  end
12
12
 
@@ -23,10 +23,10 @@ module ActsAsLiving::ValidationsDefiner
23
23
  errors.add(:stage, message)
24
24
  end
25
25
 
26
- def initialized_stage
27
- return if stage == self.class.initial_stage
26
+ def stage_is_first_stage
27
+ return if stage == self.class.first_stage
28
28
 
29
- errors.add(:stage, "Contract has to be initialized with '#{self.class.initial_stage}' stage")
29
+ errors.add(:stage, "Contract has to be initialized with '#{self.class.first_stage}' stage")
30
30
  end
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module ActsAsLiving
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_living
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Andrade