diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-02-20 20:42:35 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-21 10:16:14 -0800 |
commit | 32eef69dc1abbf9b67de780a882754e1717c2a3b (patch) | |
tree | ec88ff3d6a212e900ff63dbcf49172d501782ea8 /activerecord/lib/active_record/associations/has_one_association.rb | |
parent | 73ff0076b37316af685bc411bd11a7908d7794f6 (diff) | |
download | rails-32eef69dc1abbf9b67de780a882754e1717c2a3b.tar.gz rails-32eef69dc1abbf9b67de780a882754e1717c2a3b.tar.bz2 rails-32eef69dc1abbf9b67de780a882754e1717c2a3b.zip |
Delegate Association#options to the reflection, and replace 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
Diffstat (limited to 'activerecord/lib/active_record/associations/has_one_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_one_association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index bff537d3c5..47d0042519 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -8,7 +8,7 @@ module ActiveRecord reflection.klass.transaction do if target && target != record - remove_target!(reflection.options[:dependent]) + remove_target!(options[:dependent]) end if record @@ -29,7 +29,7 @@ module ActiveRecord protected def association_scope - super.order(reflection.options[:order]) + super.order(options[:order]) end private |