From 54b44c93e4839fc1e6e46b103c6b4bb6b335468c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20B=C3=B6ttger?= Date: Thu, 17 May 2012 22:05:43 +1200 Subject: [PATCH] new version 3.0.6: bugfix: if configured to skip validation the code does not validate anymore --- CHANGELOG.md | 4 ++++ lib/aasm/persistence/active_record_persistence.rb | 2 +- lib/aasm/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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