diff options
author | Cristian Bica <cristian.bica@gmail.com> | 2014-08-17 23:48:44 +0300 |
---|---|---|
committer | Abdelkader Boudih <terminale@gmail.com> | 2014-08-17 23:10:45 +0000 |
commit | 3faa61ede58aa29400e4e062a799c61913ae213f (patch) | |
tree | e52f444b68d7ffa2103f0e55aa33b78e26987afe /activejob/test/models/person.rb | |
parent | 9a3426220145cf8862324f204eece64f3a6a4634 (diff) | |
download | rails-3faa61ede58aa29400e4e062a799c61913ae213f.tar.gz rails-3faa61ede58aa29400e4e062a799c61913ae213f.tar.bz2 rails-3faa61ede58aa29400e4e062a799c61913ae213f.zip |
[ActiveJob] raise DeserializationError when got an error deserializing
Diffstat (limited to 'activejob/test/models/person.rb')
-rw-r--r-- | activejob/test/models/person.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activejob/test/models/person.rb b/activejob/test/models/person.rb index b31396db4b..76a8f40616 100644 --- a/activejob/test/models/person.rb +++ b/activejob/test/models/person.rb @@ -1,9 +1,12 @@ class Person + class RecordNotFound < StandardError; end + include GlobalID::Identification attr_reader :id def self.find(id) + raise RecordNotFound.new("Cannot find person with ID=404") if id.to_i==404 new(id) end |