Class: Spree::Api::V2::Storefront::WishedItemsController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/api/v2/storefront/wished_items_controller.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



8
9
10
# File 'app/controllers/spree/api/v2/storefront/wished_items_controller.rb', line 8

def collection
  @collection ||= spree_current_user.wished_items.where(variant_id: params[:variant_id])
end

#collection_serializerObject



16
17
18
# File 'app/controllers/spree/api/v2/storefront/wished_items_controller.rb', line 16

def collection_serializer
  Spree::V2::Storefront::WishedItemSerializer
end

#model_classObject



12
13
14
# File 'app/controllers/spree/api/v2/storefront/wished_items_controller.rb', line 12

def model_class
  Spree::WishedItem
end