Aasm manage states

Is there a way to manage the states in AASM by keeping them in a table
to normalize the data?

Not really sure, how to understand your question.

I was also wondering on how to use AASM to extend states during run-
time. Is it this what you are asking?

Well sort of. Basically you have a ton of states that are defined in
the model, is there away to take those stares and define them in the
db and have a fk pointing back to the main model. Normalized db.
Repeated data extrapolated into another table.

[Please quote when replying – otherwise, it’s hard to figure out what
you’re replying to.]

Chris H. wrote:

Well sort of. Basically you have a ton of states that are defined in
the model, is there away to take those stares and define them in the
db and have a fk pointing back to the main model. Normalized db.
Repeated data extrapolated into another table.

That’s easy enough to do in general. You were asking about AASM,
though, and I’m not sure how to get that working without patching AASM.
A patch shouldn’t be difficult, and I’ve also been bothered enough by
AASM’s lack of normalization that I might write one at some point…

…but for now, I’ve kind of accepted the lack of normalization as the
price to pay for easy AASM management. Perhaps an enumerated type would
be a good compromise, if your DB supports it (there are plugins to get
enumerated types working with Rails).

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]