Class: Api::ProductsController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::ProductsController
- Includes:
- Spree::Search
- Defined in:
- app/controllers/api/products_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/api/products_controller.rb', line 15 def destroy puts "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" puts params[object_name] puts params[:id] @object=Product.find_by_id(params[:id]) @object.destroy if @object.destroy render :text => 'Destroyed' end end |