Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SteveRedka opened this issue Jan 17, 2020 · 0 comments

Comments

@SteveRedka
Copy link

SteveRedka commented Jan 17, 2020

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 SteveRedka changed the title If you don't use prefix for client_service, it ignores "only" argument If you don't use prefix for client_service, it ignores ":only" argument Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant