Module: Spree::Api::V3::BulkOperations
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/concerns/spree/api/v3/bulk_operations.rb
Overview
API-side counterpart to Spree::Admin::BulkOperationsConcern. Provides
the shared tag bulk actions, the bulk_collection relation, and the
after_bulk_tags_change hook controllers override (e.g. to reindex
search + match automatic taxons). Shape mirrors the legacy concern so
the two stay easy to keep in sync.
Instance Method Summary collapse
-
#bulk_add_tags ⇒ Object
POST /api/v3/admin/
/bulk_add_tags Body: { ids: [...], tags: ['summer', 'sale'] }. -
#bulk_remove_tags ⇒ Object
POST /api/v3/admin/
/bulk_remove_tags Body: { ids: [...], tags: ['summer', 'sale'] }.
Instance Method Details
#bulk_add_tags ⇒ Object
POST /api/v3/admin/
20 21 22 23 24 25 26 27 |
# File 'app/controllers/concerns/spree/api/v3/bulk_operations.rb', line 20 def :update, model_class Spree::Tags::BulkAdd.call(tag_names: Array(params[:tags]), records: bulk_collection) render json: end |
#bulk_remove_tags ⇒ Object
POST /api/v3/admin/
31 32 33 34 35 36 37 38 |
# File 'app/controllers/concerns/spree/api/v3/bulk_operations.rb', line 31 def :update, model_class Spree::Tags::BulkRemove.call(tag_names: Array(params[:tags]), records: bulk_collection) render json: end |