app/controllers/spree/cart_controller_decorator.rb
MyNewAwesomeCartSerializer
and also it will swap the default add_item_service
to MyNewAwesomeAddItemToCart
.
Different API endpoints can have different dependency injection points. You can review their source code to see what you can configure.
config/initializers/spree.rb
) please add:
AnotherAddItemToCart
and the rest of the application will use MyNewAwesomeAddItemToCart
Values set in the initializer have to be strings, eg. 'MyNewAwesomeAddItemToCart'