spree-multi-domain
spree-multi-domain copied to clipboard
[Admin::Order) Search/Add variants will list ALL variants
isn't it better if i can search only the products/variants that belongs to the store which the order belongs to ?
i patched that. i add data-store-id
to the body, send that in the ajax-request
and then scope it
Spree::Api::V1::VariantsController.class_eval do
def scope
#...
variants.where(store_id: params[:store_id]).accessible_by(current_ability, :read)
anybody know a better solution?