diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-22 18:29:05 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-04-22 23:11:15 +0900 |
commit | ca9ac310028d0009edf1fbf657541d2dea327535 (patch) | |
tree | 83fd7c9fcbe6410ca670ae15439e85fe8c95188e /activerecord/lib/active_record/relation | |
parent | 0541a0d5481043a9c78371446389794944daf3f0 (diff) | |
download | rails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.gz rails-ca9ac310028d0009edf1fbf657541d2dea327535.tar.bz2 rails-ca9ac310028d0009edf1fbf657541d2dea327535.zip |
`respond_to_missing?` should be private
Follow up of 03d3f036.
Some of `respond_to?` were replaced to `respond_to_missing?` in 03d3f036.
But the visibility is still public. It should be private.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/delegation.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb index 50378f9d99..8b4dd25689 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -109,12 +109,10 @@ module ActiveRecord end end - def respond_to_missing?(method, include_private = false) - super || @klass.respond_to?(method, include_private) || - arel.respond_to?(method, include_private) - end - private + def respond_to_missing?(method, _) + super || @klass.respond_to?(method) || arel.respond_to?(method) + end def method_missing(method, *args, &block) if @klass.respond_to?(method) |