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

Updating README.

This commit is contained in:
Yannick Rekinger 2016-03-18 15:46:36 +01:00
parent ed04f258ba
commit 79f9178286

View file

@ -889,7 +889,7 @@ In the meantime you can use [my fork](https://github.com/Infotaku/cdq.git), ther
AASM still has some issues with object proxies, so if you are using some libraries that put proxies in front of your objects, use AASM still has some issues with object proxies, so if you are using some libraries that put proxies in front of your objects, use
`AASM::StateMachine.copy_over(self, :ProxyClass)` after having defined your states. `AASM::StateMachine.copy_over(self, :ProxyClass)` after having defined your states.
ex : ex :
``` ```ruby
class WillBeProxiedByCDQ < CDQManagedObject; end class WillBeProxiedByCDQ < CDQManagedObject; end
o = WillBeProxiedByCDQ.new o = WillBeProxiedByCDQ.new
o.class o.class
@ -905,7 +905,7 @@ o.class
=> NSKVONotifying_WillBeProxiedByKVO => NSKVONotifying_WillBeProxiedByKVO
``` ```
Any of these will break AASM if you include it to their class : Any of these will break AASM if you include it to their class :
``` ```ruby
class WillBeProxiedByCDQ < CDQManagedObject class WillBeProxiedByCDQ < CDQManagedObject
include AASM include AASM
@ -942,7 +942,7 @@ o.state1?
=> Error => Error
``` ```
Fix it by doing : Fix it by doing :
``` ```ruby
class WillBeProxiedByCDQ < CDQManagedObject class WillBeProxiedByCDQ < CDQManagedObject
include AASM include AASM