Sha256: a9593b54a1d52c65a9c61f34760d1a0a43df6129ea78e2159c79c13cae5aa323

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

require 'api_resource/associations/multi_object_proxy'
module ApiResource
  module Associations
    class HasManyRemoteObjectProxy < MultiObjectProxy
      def initialize(klass, owner)
        super(klass, owner)
        self.remote_path = self.klass.collection_path(
          self.owner.class.to_s.foreign_key => self.owner.id
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_resource-0.5.1 lib/api_resource/associations/has_many_remote_object_proxy.rb
api_resource-0.5.0 lib/api_resource/associations/has_many_remote_object_proxy.rb