Sha256: 939289bf45c43fbcd1ddf4294f4db06f5b8f30dfa288ec3379ec1a6cb82949ae
Contents?: true
Size: 572 Bytes
Versions: 28
Compression:
Stored size: 572 Bytes
Contents
require 'api_resource/associations/single_object_proxy' module ApiResource module Associations class BelongsToRemoteObjectProxy < SingleObjectProxy def initialize(klass_name, contents, owner) super return if self.internal_object # now if we have an owner and a foreign key, we set the data up to load if owner && key = owner.send(self.klass.to_s.foreign_key) self.load({"service_uri" => self.klass.element_path(key), "scopes_only" => true}.merge(self.klass.scopes)) end true end end end end
Version data entries
28 entries across 28 versions & 1 rubygems