module ActiveRecord::AttributeMethods::ClassMethods

def dangerous_attribute_method?(name) # :nodoc:

:nodoc:
not by any ancestors. (So 'puts' is not dangerous but 'save' is.)
A method name is 'dangerous' if it is already (re)defined by Active Record, but
def dangerous_attribute_method?(name) # :nodoc:
  ::ActiveRecord::AttributeMethods.dangerous_attribute_methods.include?(name.to_s)
end