Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/apartment/delayed_job/active_record.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.yaml_new(klass, tag, val) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/apartment/delayed_job/active_record.rb', line 7 def self.yaml_new(klass, tag, val) Apartment::Database.process(val['database']) do klass.find(val['attributes']['id']) end rescue ActiveRecord::RecordNotFound raise Delayed::DeserializationError end |
Instance Method Details
#to_yaml_properties ⇒ Object
15 16 17 |
# File 'lib/apartment/delayed_job/active_record.rb', line 15 def to_yaml_properties ['@attributes', '@database'] # add in database attribute for serialization end |