search for: acts_as_limited_opt

Displaying 1 result from an estimated 1 matches for "acts_as_limited_opt".

2006 Aug 08
1
limit user input for legacy coding schemes
...o have a string field in the model being tagged with a code, limit user input via a select box and validate against the codes. Is there a pre-existing facility in rails for this? If not, where would be the best place to store these arrays of codes. I imagine writing some sort of plugin, say acts_as_limited_options, which when applied to a column and specified with the array to validate against, adds a custom validation against the array and adds a method to get the array of options for use in a select box. Does this make sense? Thanks. -- Posted via http://www.ruby-forum.com/.