How to implement a status table


#1

I have a from that will have a status, “approved”, “in
process”,denied"… and such.

What is the best approach?
Status table,
One row with each column status type?
The form will have only one status so I will have to manage making
sure all columns that are not “true” will be false.

If I set it up so I populate the table with each row being a status
type then it will be easier to implement.
I could have a drop down to change status dynamically…

Any ideas?


#2

Chris H. wrote:

I have a from that will have a status, “approved”, “in
process”,denied"… and such.

What is the best approach?

If a record can only have one status at a time, then it only needs one
status field.

Consider using aasm – it’s meant for exactly this purpose.

Best,

Marnen Laibow-Koser
http://www.marnen.org
removed_email_address@domain.invalid


#3

Marnen Laibow-Koser wrote:

Chris H. wrote:

I have a from that will have a status, “approved”, “in
process”,denied"… and such.

What is the best approach?

If a record can only have one status at a time, then it only needs one
status field.

Consider using aasm – it’s meant for exactly this purpose.

This is what Marnen suggested, which I concur:
http://github.com/rubyist/aasm/tree/master


#4

OK, cool. thanks, looking now.

On Apr 14, 4:05 pm, Robert W. removed_email_address@domain.invalid