Displaying 1 result from an estimated 1 matches for "anotherenum".
2005 Aug 19
13
Enumerations (again): Comments please
...class in a separate file for each
enumeration.
- It should be possible to store each enumeration in its own table or
all enumerations in a single table.
The resulting syntax looks like this:
BoilerPlate::Enumerations::define_enums(
''FirstEnum'',
{:class_name => ''AnotherEnum, :table_name => ''second_enum'' }
)
Further options are :position for ordering and :conditions which can be
used to map records from the same table to different enumeration
classes.
Include a code snippet like the one above in config/environment.rb and
that''s all th...