diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fd875d..4e8a71a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/aasm/persistence/active_record_persistence.rb b/lib/aasm/persistence/active_record_persistence.rb index 00216f9..09dbf56 100644 --- a/lib/aasm/persistence/active_record_persistence.rb +++ b/lib/aasm/persistence/active_record_persistence.rb @@ -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 diff --git a/lib/aasm/version.rb b/lib/aasm/version.rb index e8817d5..52530f1 100644 --- a/lib/aasm/version.rb +++ b/lib/aasm/version.rb @@ -1,3 +1,3 @@ module AASM - VERSION = "3.0.5" + VERSION = "3.0.6" end