diff options
author | Iain Hecker <iain@iain.nl> | 2011-03-19 21:53:49 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-21 10:29:45 -0700 |
commit | 96b9fc44000e5f40ba463ff0e893db8c4fd33b85 (patch) | |
tree | 6fdf2a555cbd362033e900b01756b03a8ea4261b /activerecord/lib | |
parent | 55bf087da1d93eda93f9b9632fc363fd4788bed2 (diff) | |
download | rails-96b9fc44000e5f40ba463ff0e893db8c4fd33b85.tar.gz rails-96b9fc44000e5f40ba463ff0e893db8c4fd33b85.tar.bz2 rails-96b9fc44000e5f40ba463ff0e893db8c4fd33b85.zip |
Reapply extensions when using except and only
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 4150e36a9a..128e0fbd86 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -79,6 +79,9 @@ module ActiveRecord result.send(:"#{method}_value=", send(:"#{method}_value")) end + # Apply scope extension modules + result.send(:apply_modules, extensions) + result end @@ -100,6 +103,9 @@ module ActiveRecord result.send(:"#{method}_value=", send(:"#{method}_value")) end + # Apply scope extension modules + result.send(:apply_modules, extensions) + result end |