diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-02-20 20:34:06 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-21 10:16:14 -0800 |
commit | 73ff0076b37316af685bc411bd11a7908d7794f6 (patch) | |
tree | 2e1d43ae28bd7926ed811a5df50659e5c283dc92 /activerecord/lib/active_record/associations/belongs_to_association.rb | |
parent | 1d85a73cebeea26a3ec384db1c110f6b79d9cda2 (diff) | |
download | rails-73ff0076b37316af685bc411bd11a7908d7794f6.tar.gz rails-73ff0076b37316af685bc411bd11a7908d7794f6.tar.bz2 rails-73ff0076b37316af685bc411bd11a7908d7794f6.zip |
Singular associations no longer use a proxy, so no need to check for the proxy type on assignment.
Diffstat (limited to 'activerecord/lib/active_record/associations/belongs_to_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/belongs_to_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/belongs_to_association.rb b/activerecord/lib/active_record/associations/belongs_to_association.rb index d6c107bf9f..c1471c72df 100644 --- a/activerecord/lib/active_record/associations/belongs_to_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_association.rb @@ -3,7 +3,7 @@ module ActiveRecord module Associations class BelongsToAssociation < SingularAssociation #:nodoc: def replace(record) - record = check_record(record) + raise_on_type_mismatch(record) if record update_counters(record) replace_keys(record) |