aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorLauro Caetano <laurocaetano1@gmail.com>2013-12-12 20:19:04 -0200
committerLauro Caetano <laurocaetano1@gmail.com>2013-12-12 20:19:04 -0200
commit1244aa7c5f871da5e907a39242b63a7aee3308a3 (patch)
tree4098cb84c5aba3aa4b8f791f6248ff2dced3b115 /activerecord/lib
parentaa85bdba68eb981588cecfef9dea0c0fa3e1c673 (diff)
downloadrails-1244aa7c5f871da5e907a39242b63a7aee3308a3.tar.gz
rails-1244aa7c5f871da5e907a39242b63a7aee3308a3.tar.bz2
rails-1244aa7c5f871da5e907a39242b63a7aee3308a3.zip
Use `public_send` instead of just use `send`.
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/delegation.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index af6be24351..603e5a9df5 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -68,7 +68,7 @@ module ActiveRecord
RUBY
else
define_method method do |*args, &block|
- scoping { @klass.send(method, *args, &block) }
+ scoping { @klass.public_send(method, *args, &block) }
end
end
end
@@ -87,10 +87,10 @@ module ActiveRecord
def method_missing(method, *args, &block)
if @klass.respond_to?(method)
self.class.delegate_to_scoped_klass(method)
- scoping { @klass.send(method, *args, &block) }
+ scoping { @klass.public_send(method, *args, &block) }
elsif arel.respond_to?(method)
self.class.delegate method, :to => :arel
- arel.send(method, *args, &block)
+ arel.public_send(method, *args, &block)
else
super
end
@@ -118,9 +118,9 @@ module ActiveRecord
def method_missing(method, *args, &block)
if @klass.respond_to?(method)
- scoping { @klass.send(method, *args, &block) }
+ scoping { @klass.public_send(method, *args, &block) }
elsif arel.respond_to?(method)
- arel.send(method, *args, &block)
+ arel.public_send(method, *args, &block)
else
super
end