diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-11-29 02:19:10 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-11-29 02:19:10 +0000 |
commit | e302759451fbed36d7e8916d7b5c8377762e3efd (patch) | |
tree | b81444c861a94fab84a87cc0a6b5a112635fe581 /activerecord/lib | |
parent | 0a9bc591e78382b221ef5c2f463bac90564b9982 (diff) | |
download | rails-e302759451fbed36d7e8916d7b5c8377762e3efd.tar.gz rails-e302759451fbed36d7e8916d7b5c8377762e3efd.tar.bz2 rails-e302759451fbed36d7e8916d7b5c8377762e3efd.zip |
Make reset return nil when using a dangling belongs_to association. Current behaviour is to return false which can be confusing. Closes #10293 [fcheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 32810c91e0..1e4414cfe3 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -46,8 +46,8 @@ module ActiveRecord alias :sql_conditions :conditions def reset - @target = nil @loaded = false + @target = nil end def reload |