instance_method_already_implemented?(method_name)
Instance Public methods
Raises a ActiveRecord::DangerousAttributeError
exception when
an Active Record method is defined in the model, otherwise
false
.
class Person < ActiveRecord::Base def save 'already defined by Active Record' end end Person.instance_method_already_implemented?(:save) # => ActiveRecord::DangerousAttributeError: save is defined by ActiveRecord Person.instance_method_already_implemented?(:name) # => false
Please login to continue.