Sha256: e5e3e45ff5c7dca7f41acc036c74adbe811e13257e36d1bac9c07f2033efd318
Contents?: true
Size: 575 Bytes
Versions: 23
Compression:
Stored size: 575 Bytes
Contents
require 'api_resource/associations/multi_object_proxy' module ApiResource module Associations class HasManyRemoteObjectProxy < MultiObjectProxy def initialize(klass_name, contents, owner) super return if self.internal_object.present? || self.remote_path # now if we have an owner and a foreign key, we set the data up to load if owner self.load({"service_uri" => self.klass.collection_path(self.owner.class.to_s.foreign_key => self.owner.id)}.merge(self.klass.scopes)) end true end end end end
Version data entries
23 entries across 23 versions & 1 rubygems