Calling model methods even when the param is a not set
|
|
Hello, I’m setting a checkbox values based on the return of a model field method. The way the method is set up – it only gets called when a checkbox value is set. Here’s the model code: [code] def within=(new_within) @within = new_within "1" || new_within true || new_within 'true' || new_within ‘on’ end [/code] I would like that method to be called even when the checkbox is not set. Thanks for any help anyone can provide. Clem C |