Class: Spree::Api::V2::Storefront::OrderProductsTaxonsController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Spree::Api::V2::Storefront::OrderProductsTaxonsController
- Defined in:
- app/controllers/spree/api/v2/storefront/order_products_taxons_controller.rb
Instance Method Summary collapse
Instance Method Details
#collection ⇒ Object
6 7 8 |
# File 'app/controllers/spree/api/v2/storefront/order_products_taxons_controller.rb', line 6 def collection @collection || order.taxons end |
#collection_serializer ⇒ Object
14 15 16 |
# File 'app/controllers/spree/api/v2/storefront/order_products_taxons_controller.rb', line 14 def collection_serializer Spree::V2::Storefront::TaxonSerializer end |
#order ⇒ Object
10 11 12 |
# File 'app/controllers/spree/api/v2/storefront/order_products_taxons_controller.rb', line 10 def order @order ||= Spree::Order.find_by!(number: order_params[:number]) end |
#order_params ⇒ Object
18 19 20 |
# File 'app/controllers/spree/api/v2/storefront/order_products_taxons_controller.rb', line 18 def order_params params.permit(:number) end |