Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/delayed/serialization/active_record.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.yaml_new(klass, _tag, val) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/delayed/serialization/active_record.rb', line 6 def self.yaml_new(klass, _tag, val) klass.unscoped.find(val['attributes'][klass.primary_key]) rescue ActiveRecord::RecordNotFound raise Delayed::DeserializationError, "ActiveRecord::RecordNotFound, class: #{klass} , primary key: #{val['attributes'][klass.primary_key]}" end |
Instance Method Details
#to_yaml_properties ⇒ Object
13 14 15 |
# File 'lib/delayed/serialization/active_record.rb', line 13 def to_yaml_properties ['@attributes'] end |