aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/named_scope.rb
diff options
context:
space:
mode:
authorJan De Poorter <jan@defv.be>2008-08-25 12:37:34 +0200
committerPratik Naik <pratiknaik@gmail.com>2008-08-29 14:06:37 +0100
commitdb116a2ed688d36570f412a42e9fc33dcbca56c7 (patch)
tree2f2623fc889af731135efbc06371db59ba9cc27c /activerecord/lib/active_record/named_scope.rb
parent6577942b61b98e3bca54c0af3df57f8334b832b9 (diff)
downloadrails-db116a2ed688d36570f412a42e9fc33dcbca56c7.tar.gz
rails-db116a2ed688d36570f412a42e9fc33dcbca56c7.tar.bz2
rails-db116a2ed688d36570f412a42e9fc33dcbca56c7.zip
Fix NamedScope regex so methods containing "an" get delegated to proxy_found. [#901 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/named_scope.rb')
-rw-r--r--activerecord/lib/active_record/named_scope.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb
index c99c4beca9..b9b7eb5f00 100644
--- a/activerecord/lib/active_record/named_scope.rb
+++ b/activerecord/lib/active_record/named_scope.rb
@@ -103,7 +103,7 @@ module ActiveRecord
attr_reader :proxy_scope, :proxy_options
[].methods.each do |m|
- unless m =~ /(^__|^nil\?|^send|^object_id$|class|extend|^find$|count|sum|average|maximum|minimum|paginate|first|last|empty?|any?|respond_to?)/
+ unless m =~ /(^__|^nil\?|^send|^object_id$|class|extend|^find$|count|sum|average|maximum|minimum|paginate|first|last|empty\?|any\?|respond_to\?)/
delegate m, :to => :proxy_found
end
end