Where (what function name must I insert in my controller, I assume) can I obtain the selected value from a field in a form, to process and change it before it gets written to the model's table in the db? Thanks, Janna B.
on 2009-05-28 14:16
on 2009-05-28 14:55
Well, you *could* choose the ugly path and just place that code in the controller create and/or update methods, after your model is reconstituted from the params. Or choose a better path and place that code in a method in the model, and define a before_save in the model that invokes the method (before_save is called for either create or update).