search for: before_create_save

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

2007 Aug 23
0
active scaffold polymorphic model
...in the views. Can I turn this off so that it shows the id? Params is now passed with :record => {:item_type => "SelectedType", :item_id => id corresponding to the name chosen} which should correctly save the record, however, the record is saved without the item_id. If I use the before_create_save(record) and before_update_save(record) functions and do record.item_id = params[:record][:item_id] it works. I have found in the documentation that only whitelisted fields are saved, however, I did include :item_id in the config.columns... I would appreciate it if anyone can provide some insights...