Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/serialization/active_record.rb

Direct Known Subclasses

Delayed::Backend::ActiveRecord::Job

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.yaml_new(klass, tag, val) ⇒ Object



4
5
6
7
8
# File 'lib/delayed/serialization/active_record.rb', line 4

def self.yaml_new(klass, tag, val)
  klass.find(val['attributes']['id'])
rescue ActiveRecord::RecordNotFound
  raise Delayed::DeserializationError
end

Instance Method Details

#to_yaml_propertiesObject



10
11
12
# File 'lib/delayed/serialization/active_record.rb', line 10

def to_yaml_properties
  ['@attributes']
end