instance method respond_to?

Ruby on Rails 3.0.20

Since v3.0.20 Last seen in v3.1.12

Available in: v3.0.20 v3.1.12

Signature

respond_to?(method, include_private = false)

No documentation comment.

Parameters

method req
include_private opt = false
Source
# 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

Defined in activerecord/lib/active_record/relation.rb line 49 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Relation

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close