instance method
dangerous_attribute_method?
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5Signature
dangerous_attribute_method?(name)
A method name is ‘dangerous’ if it is already defined by Active Record, but not by any ancestors. (So ‘puts’ is not dangerous but ‘save’ is.)
Parameters
-
namereq
Source
# File activerecord/lib/active_record/attribute_methods.rb, line 105
def dangerous_attribute_method?(name)
method_defined_within?(name, Base)
end
Defined in activerecord/lib/active_record/attribute_methods.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::ClassMethods