aboutsummaryrefslogtreecommitdiffstats
path: root/railties/helpers
diff options
context:
space:
mode:
authorTim Harper <timcharper@gmail.com>2008-05-13 19:17:40 -0600
committerrick <technoweenie@gmail.com>2008-05-31 13:27:25 -0700
commit0580b31b36c0f7dd1a0f8bdd1b1806e3bd65b22d (patch)
tree8bb596cb3279cf0b703edd6e8a3a70a7b443a082 /railties/helpers
parentf7015336f66d284cff8ecb89df9f430791ac57ea (diff)
downloadrails-0580b31b36c0f7dd1a0f8bdd1b1806e3bd65b22d.tar.gz
rails-0580b31b36c0f7dd1a0f8bdd1b1806e3bd65b22d.tar.bz2
rails-0580b31b36c0f7dd1a0f8bdd1b1806e3bd65b22d.zip
belongs_to polymorphic association assignments update the foreign_id and foreign_type fields regardless of whether the record being assigned is new or not.
fixes the following scenarios: * I have validates_inclusion_of on the type field for a polymorphic belongs_to association. I assign a new record to the model's polymorphic relationship of the proper type. validation fails because the type field has not been updated. * I replace the value for a ppolymorphic association to a new record of another class. The type field still says its the previous class, and the id field points to the previous record as well. [#191 state:closed]
Diffstat (limited to 'railties/helpers')
0 files changed, 0 insertions, 0 deletions