search for: valid_keys_for_belongs_to_associ

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

2009 Mar 10
0
autosave no longer a valid option for belongs_to?
The Rails API doc (api.rubyonrails.org) says that :autosave is still a valid option for belongs_to in the latest version of Rails. However, a look at the activerecord/lib/active_record/associations.rb (line 1590) reveals that it is not in the @@valid_keys_for_belongs_to_association array. I also noticed that it''s not in the ActiveRecord API doc (ar.rubyonrails.org). Does anyone have any more information on this? What is the current best practice for persisting your child objects when saving a parent object? Here''s an example: class PaymentMethod <...