diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-14 14:30:47 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-14 14:30:47 -0800 |
commit | ef4ffed660015772f67826e8aaa319febe84f271 (patch) | |
tree | 5553a1d355ce7b8f44891d22d80ef539ebb0d731 /activerecord/lib | |
parent | 2947197421dd6b00a3c6694b768322d095cda69b (diff) | |
download | rails-ef4ffed660015772f67826e8aaa319febe84f271.tar.gz rails-ef4ffed660015772f67826e8aaa319febe84f271.tar.bz2 rails-ef4ffed660015772f67826e8aaa319febe84f271.zip |
reduce some lasigns
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index f2de788522..b752f1fdc0 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -185,9 +185,8 @@ module ActiveRecord scope = target_klass.unscoped scope = scope.create_with(creation_attributes) scope = scope.apply_finder_options(@reflection.options.slice(:conditions, :readonly, :include)) - scope = scope.where(construct_owner_conditions) scope = scope.select(select_value) if select_value = self.select_value - scope + scope.where(construct_owner_conditions) end def select_value |