1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/associations
Tim Harper 0580b31b36 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]
2008-05-31 13:27:25 -07:00
..
belongs_to_associations_test.rb belongs_to polymorphic association assignments update the foreign_id and foreign_type fields regardless of whether the record being assigned is new or not. 2008-05-31 13:27:25 -07:00
callbacks_test.rb Make HABTM#create behave the same as << with after_add callbacks. Closes #11374 [freels] 2008-04-04 14:37:22 +00:00
cascaded_eager_loading_test.rb Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen] 2008-03-24 02:50:02 +00:00
eager_load_nested_include_test.rb Move the eager load nested include tables into schema.rb and use delete_all instead of drop table to reset the state. 2008-02-20 05:31:03 +00:00
eager_singularization_test.rb Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails 2008-01-21 17:20:51 +00:00
eager_test.rb When preloading group by reflection rather than by class [#125 state:resolved] 2008-05-11 22:14:07 +01:00
extension_test.rb Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails 2008-01-21 17:20:51 +00:00
has_and_belongs_to_many_associations_test.rb Add first/last methods to associations/named_scope. [#226 state:resolved] 2008-05-20 12:27:14 +01:00
has_many_associations_test.rb Ensure query assertion counts are the same when partial updates are enabled 2008-05-30 04:36:00 -07:00
has_many_through_associations_test.rb Ensure query assertion counts are the same when partial updates are enabled 2008-05-30 04:36:00 -07:00
has_one_associations_test.rb Fix faulty tests introduced in 8d0b4fa39 2008-05-24 18:34:59 +12:00
has_one_through_associations_test.rb Split associations_test.rb into multiple files based on association type. [Pratik] 2008-04-06 03:01:09 +00:00
inner_join_association_test.rb Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails 2008-01-21 17:20:51 +00:00
join_model_test.rb Add first/last methods to associations/named_scope. [#226 state:resolved] 2008-05-20 12:27:14 +01:00