1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
Commit graph

11 commits

Author SHA1 Message Date
Victor Shcherbakov
ae0f78a83e Add whiny_persistence support and some tests for Mongoid 2017-02-24 13:01:23 +05:30
Eugene Haisenka
7eebc4c1a6 Add tests for multiple named scopes 2016-09-18 17:06:10 +03:00
Anil
54c4fc4c5d Fix Mongoid has_many association _ids helper issue
- fix #332
2016-02-26 03:06:35 +05:30
Thorsten Böttger
440587c806 add a complex example spec for Mongoid 2015-07-11 22:10:47 +12:00
Thorsten Böttger
3970cc45b0 test support for Mongoid and multiple state machines per class 2015-07-11 00:16:58 +12:00
Shweta
1c37b50871 Refs [#206] Initialize aasm state after initialize for mongoid 2015-02-22 16:43:01 +05:30
Thorsten Böttger
08d0511c90 still supporting Ruby 1.8.7 2013-12-01 00:23:34 +01:00
Thorsten Böttger
cbb3d78a80 deprecate usage of AASM.aasm_state (setter method) 2013-11-30 21:30:07 +01:00
Thorsten Böttger
a3700b2826 added configuration option to disable automatic scope creation 2013-08-06 16:55:32 +02:00
Thorsten Böttger
461886e394 one file per test model class 2013-04-21 18:43:03 +02:00
Johnny Shields
13e7090d40 Added autocreation of state scopes for Mongoid, including RSpec tests. The interface mirrors the ActiveRecord support for the same.
Summary of changes
- Added the following methods to persistence/mongoid_persistence.rb
  - find_in_state
  - count_in_state
  - with_state_scope (protected in AR, would argue it should be made public there.
  - I did not port calculate_in_state, due to AR vs. Mongoid API differences; I made with_state_scope public instead. (I think it should be public for AR as well.)
- Moved AASM::Base patch which aliases scopes in persistence/active_record_persistence.rb to persistence/base.rb, and added a Mongoid detection clause to the if statement (in addition to AR). Also deleted commented code from the original method.
- Added 'mongoid' as dev dependency to gemspec
- Created two test files (mongoid_persistance_spec.rb and mongoid_models.rb) covering all my changes.
2013-01-07 07:29:35 +09:00