module ActiveModel::AttributeMethods
def respond_to?(method, include_private_methods = false)
def respond_to?(method, include_private_methods = false) if super true elsif !include_private_methods && super(method, true) # If we're here then we haven't found among non-private methods # but found among all methods. Which means that the given method is private. false else !matched_attribute_method(method.to_s).nil? end end