Returns true if the comparison_object is the same object, or is of the same type and has the same id.
Source Code
# File active_record/base.rb, line 2187 def ==(comparison_object) comparison_object.equal?(self) || (comparison_object.instance_of?(self.class) && comparison_object.id == id && !comparison_object.new_record?) end
<code/>and<pre/>for code samples.