diff options
author | Abdelkader Boudih <terminale@gmail.com> | 2014-08-12 09:17:19 +0000 |
---|---|---|
committer | Abdelkader Boudih <terminale@gmail.com> | 2014-08-12 09:17:19 +0000 |
commit | a75f085941b2d6aed160f5f2f7e64e5fc7e03826 (patch) | |
tree | 23174b264983a15c3108ec912b355829c5f17a80 /activejob/test/models | |
parent | b45b99894a60eda434abec94d133a1cfd8de2dda (diff) | |
parent | 14f74a8331f94150dfee653224de8fc837797709 (diff) | |
download | rails-a75f085941b2d6aed160f5f2f7e64e5fc7e03826.tar.gz rails-a75f085941b2d6aed160f5f2f7e64e5fc7e03826.tar.bz2 rails-a75f085941b2d6aed160f5f2f7e64e5fc7e03826.zip |
Add 'activejob/' from commit '14f74a8331f94150dfee653224de8fc837797709'
git-subtree-dir: activejob
git-subtree-mainline: b45b99894a60eda434abec94d133a1cfd8de2dda
git-subtree-split: 14f74a8331f94150dfee653224de8fc837797709
Diffstat (limited to 'activejob/test/models')
-rw-r--r-- | activejob/test/models/person.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/activejob/test/models/person.rb b/activejob/test/models/person.rb new file mode 100644 index 0000000000..a5bdbc462b --- /dev/null +++ b/activejob/test/models/person.rb @@ -0,0 +1,19 @@ +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.to_s == other_person.id.to_s + end +end |