I am developing a Ruby on Rails website and I have an \"architectural\" question : my application needs some parameters and I\'m wondering where to store them.
In co
I tend to just make a string
column for each, and use validates_inclusion_of
to set what's acceptable for them.
class Request < ActiveRecord::Base
validates_inclusion_of :validation_status, :in => ['accepted','rejected','waiting']
validates_inclusion_of :sending_status, :in => ['sent','waiting','...']
end
If you need to have things happen (ie. emails sent) when the status changes, look into using the Acts As State Machine plugin to manage it.