Commit Graph

29 Commits

Author SHA1 Message Date
Tyler Hogan 77cd065eeb Deep clone state machine during inheritance (with tests) (#429)
* Deep clone state machine during inheritance.
Allows child classes to extend the parent state machine without modifying the parents state machine.

* Add tests

* Also need to clone global callbacks to support inheritance

* Added tests to ensure parent is not changed in inheritance
2017-03-08 12:28:27 +05:30
Yannick Rekinger 3214e46f74 Support for object proxies for RubyMotion ! 2016-03-19 03:41:04 +01:00
Yannick Rekinger ed04f258ba Updating README.
Renaming AASM::StateMachine "inherit" class method to the safer "copy_over".
2016-03-18 15:43:40 +01:00
Yannick Rekinger 2b9d850d99 Better RubyMotion file management.
CoreDataQuery persistence <3
2016-03-18 02:53:19 +01:00
lingceng e750b83696 Fix #297 duplicate after_all_transitions after reload 2016-01-20 19:32:31 +08:00
Thorsten Böttger 6396847041 provide after_all_transitions callback 2015-10-17 12:19:25 +13:00
Thorsten Böttger cf7ac74664 make sure to use parameterised aasm everywhere 2015-05-26 21:29:17 +12:00
Thorsten Böttger eca394bb9b using default name (all tests green) 2015-05-26 21:29:17 +12:00
Thorsten Böttger 8f7f1b2da8 bugfix: avoid Rails autoloading conflicts (see #137 and #139) 2014-11-28 22:22:43 +01:00
Thorsten Böttger 2f5f9cb038 Merge branch 'master' into aasm4
Conflicts:
	lib/aasm/aasm.rb
	lib/aasm/persistence/active_record_persistence.rb
2014-08-18 21:44:42 +02:00
Thorsten Böttger ca6f524a98 bugfix: support reloading development environment in Rails #148 2014-08-17 18:42:19 +02:00
Thorsten Böttger 12bca87744 Merge branch 'master' into aasm4
Conflicts:
	README.md
	lib/aasm/base.rb
2014-07-13 14:17:53 +02:00
Thorsten Böttger 55f1eed4fa provide a configuration class (to easily spot configuration options) 2014-07-13 14:07:37 +02:00
Thorsten Böttger ab29f0abd4 Merge pull request #132 from enbaglisash/removing_unnecessary_attr_reader
remove unnecessary attr_reader in StateMachine class
2014-05-28 20:12:38 +02:00
Ito Tubasa 7ea16826f8 remove unnecessary attr_reader in StateMachine class 2014-05-25 21:29:11 +09:00
Ito Tubasa da0b5e0d47 move setting initial_state codes to StateMachine class 2014-05-25 21:18:54 +09:00
Ito Tubasa cfa198031c replace `clazz` to `klass` so to uniformize the variable name 2014-05-24 15:42:20 +09:00
Ito Tubasa cabab20f13 remove ivar name from StateMachine#initialize 2014-05-22 23:42:18 +09:00
Thorsten Böttger d88fa9f2bc refactored SupportClasses away 2013-02-22 16:02:40 +13:00
Thorsten Böttger b8ea0340e7 just some minor refactoring to improve readability 2013-02-22 15:52:21 +13:00
Thorsten Böttger 5619789c3d added support for localized state names (on a class level, like Record.aasm.states.map(&:localized_name)) 2012-12-27 10:23:41 +13:00
Thorsten Böttger 475985f282 started to clean up the specs 2012-11-28 22:42:41 +13:00
Ernie Miller 129f2da60a Use Ruby's initialize_copy for clone/dup
Ruby provides a method for implementing deep-copy on
objects called initialize_copy. This gets called after
a clone or dup, and is the more idiomatic way to handle
the sort of thing being done in the previously-defined
clone method.
2012-06-27 08:44:48 -04:00
Thorsten Böttger 14061ca752 class refactorings 2011-11-26 18:30:47 +01:00
Thorsten Böttger a6f77b5fa4 avoiding memory leak in Rails 3 development mode (where cache_classes == false); drawback is, that now the state machine won't be re-declared on each request; thus, changes in the state machine will force you to restart the Rails server (but this still is better than the memory leak) 2011-04-01 09:22:54 +02:00
Travis Tilley ef0eb25715 restructure, de-nest 2009-10-30 12:20:50 -04:00
Travis Tilley dc002d4684 cleanup, some refactoring, additional tests (one modeled after a common use of AASM, from restful authentication), fire callbacks on entering initial state, whitespace 2009-10-19 14:38:59 -04:00
Jacqui Maher fe13954e93 Fixed conflicts after merging with rubyist-aasm 2009-09-17 15:06:24 -04:00
Travis Tilley 1e4c038eee reorganize to match rubyist/aasm 2009-08-08 16:53:47 -04:00