I am loving using the blueprinter gem for my API, but i'm finding using it with the acts_as_tenant gem kinda cumbersome with associations. I have to pass in the account as options, which gets annoying when you have more than one association or nested associations. Is there an easier way?
class UserBlueprint < Blueprinter::Base
fields :uuid, :name, :plan
association :posts, blueprint: PostBlueprint do |user, options|
ActsAsTenant.with_tenant(options[:account]) do
user.posts
end
end
end