mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
new version 3.0.6: bugfix: if configured to skip validation the code does not validate anymore
This commit is contained in:
parent
32c1a242ef
commit
54b44c93e4
3 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
|||
# CHANGELOG
|
||||
|
||||
## 3.0.6
|
||||
|
||||
* bugfix: if configured to skip validation the code does not validate anymore
|
||||
|
||||
## 3.0.5
|
||||
|
||||
* bugfix: get rid of error with old rubygems versions
|
||||
|
|
|
@ -183,7 +183,7 @@ module AASM
|
|||
old_value = read_attribute(self.class.aasm_column)
|
||||
write_attribute(self.class.aasm_column, state.to_s)
|
||||
|
||||
success = if AASM::StateMachine[self.class].config.skip_validation_on_save && !self.valid?
|
||||
success = if AASM::StateMachine[self.class].config.skip_validation_on_save
|
||||
self.class.update_all({ self.class.aasm_column => state.to_s }, self.class.primary_key => self.id) == 1
|
||||
else
|
||||
self.save
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module AASM
|
||||
VERSION = "3.0.5"
|
||||
VERSION = "3.0.6"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue