Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: aasm/aasm
...
head fork: fcoury/aasm
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
2  lib/aasm/persistence.rb
@@ -7,7 +7,7 @@ def self.set_persistence(base)
# Use a fancier auto-loading thingy, perhaps. When there are more persistence engines.
hierarchy = base.ancestors.map {|klass| klass.to_s}
- if hierarchy.include?("ActiveRecord::Base")
+ if hierarchy.include?("ActiveRecord::Base") or hierarchy.include?("MongoMapper::EmbeddedDocument")
require File.join(File.dirname(__FILE__), 'persistence', 'active_record_persistence')
base.send(:include, AASM::Persistence::ActiveRecordPersistence)
end
View
2  lib/aasm/persistence/active_record_persistence.rb
@@ -193,7 +193,7 @@ def aasm_write_state(state)
old_value = read_attribute(self.class.aasm_column)
write_attribute(self.class.aasm_column, state.to_s)
- unless self.save(false)
+ unless self.save(:validation => false)
write_attribute(self.class.aasm_column, old_value)
return false
end

No commit comments for this range

Something went wrong with that request. Please try again.