Displaying 1 result from an estimated 1 matches for "fiiiiine".
2006 Aug 10
3
How to serialize a symbol coming from a Form
Hello, I would like to use serialized symbols as values for select in
forms.
eg.
class Vehicle < ActiveRecord::Base
@@statuses = {:wait => ''No yet'', :ok => ''Run run run''}
validates_inclusion_of status, :in => @@statutes.keys
Serialize status, Symbol
def self.statuses
@@statuses
end
end
Then, I can use Vehicle.statuses.invert to