api_struct icon indicating copy to clipboard operation
api_struct copied to clipboard

If you don't use prefix for client_service, it ignores ":only" argument

Open SteveRedka opened this issue 6 years ago • 0 comments

Let's assume we have an entity working with two APIs. For example:

  class File < ApiStruct::Entity
    client_service CdnClient, only: :show
    client_service RestClient, only: :index

    attr_entity :size, :url, :uuid, :source
  end

If you call File.show it will try to call RestClient.new.show instead of CdnClient.new.show.

SteveRedka avatar Jan 17 '20 13:01 SteveRedka