method
respond_to?
v3.0.0 -
Show latest stable
- Class:
ActiveRecord::Relation
respond_to?(method, include_private = false)public
No documentation available.
# File activerecord/lib/active_record/relation.rb, line 49
def respond_to?(method, include_private = false)
return true if arel.respond_to?(method, include_private) || Array.method_defined?(method) || @klass.respond_to?(method, include_private)
if match = DynamicFinderMatch.match(method)
return true if @klass.send(:all_attributes_exists?, match.attribute_names)
elsif match = DynamicScopeMatch.match(method)
return true if @klass.send(:all_attributes_exists?, match.attribute_names)
else
super
end
end