Class: Gemgento::Magento::PriceRulesController
- Inherits:
-
BaseController
- Object
- ApplicationController
- ApplicationController
- BaseController
- Gemgento::Magento::PriceRulesController
- Defined in:
- app/controllers/gemgento/magento/price_rules_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#destroy ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/gemgento/magento/price_rules_controller.rb', line 12 def destroy if price_rule = PriceRule.find_by(magento_id: params[:id]) price_rule.destroy end render nothing: true end |
#update ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/gemgento/magento/price_rules_controller.rb', line 5 def update if data = params[:data] API::SOAP::CatalogRule::Rule.sync_magento_to_local(data, data[:website_ids], data[:customer_group_ids]) end render nothing: true end |