blob: fb12c1c614d4f5f8fc9663bad0e13dfd3d36eca0 (
plain) (
tree)
|
|
require 'active_model/global_identification'
class Person
include ActiveModel::GlobalIdentification
attr_reader :id
def self.find(id)
new(id)
end
def initialize(id)
@id = id
end
def ==(other_person)
other_person.is_a?(Person) && id == other_person.id
end
end
|