Parent

ActiveRecord::Base

Public Class Methods

yaml_new(klass, tag, val) click to toggle source
# File lib/delayed/serialization/active_record.rb, line 5
def self.yaml_new(klass, tag, val)
  if ActiveRecord::VERSION::MAJOR == 3
    klass.unscoped.find(val['attributes'][klass.primary_key])
  else # Rails 2
    klass.with_exclusive_scope { klass.find(val['attributes'][klass.primary_key]) }
  end
rescue ActiveRecord::RecordNotFound
  raise Delayed::DeserializationError
end

Public Instance Methods

encode_with(coder) click to toggle source

serialize to YAML

# File lib/delayed/psych_ext.rb, line 4
def encode_with(coder)
  coder["attributes"] = @attributes
  coder.tag = ['!ruby/ActiveRecord', self.class.name].join(':')
end
to_yaml_properties() click to toggle source
# File lib/delayed/serialization/active_record.rb, line 15
def to_yaml_properties
  ['@attributes']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.