Using DataMapper's Enum properties with state_machine?

13 visninger
Gå til det første ulæste opslag

Rick Cobb

ulæst,
20. aug. 2012, 21.33.2320.08.2012
til pluginaw...@googlegroups.com
It looks to me like the state property is actually required to be of String type. In particular, trying to use the Enum type from dm-types seems to be a complete fail; see https://gist.github.com/3410344 .

Off-hand, it appears to me that the property's accessors are overloading the accessors created by state machine.

It's a problem for me since I'd like to retrofit state_machine onto some existing models. I've tried using the :namespace property, but that doesn't seem to help; it's not a problem of the events, but of the states and their values themselves.

Ideas, anyone?

Thanks --
-- ReC

Svar alle
Svar til forfatter
Videresend
0 nye opslag