search for: validation_select

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

2007 Oct 27
2
Current value of object.method in helper
...d not in my validation table. I do not want to add old values in my validation table; however, I would like to display these when user open a form. In order to accomplish this requirement, I need to dynamically add a current value of the record to selections in view helper like following. def validation_select(object, method, options = {}, html_options = {}) selections = Validation.find(:all).map {|v| [v.description, v.code] } selections.push [object[method], object[method]] #This does not work! select(object, method, selections, options, html_options) end Names of object and method are p...