Class: NimbleshopCod::CodsController
- Inherits:
-
Admin::PaymentMethodsController
- Object
- Admin::PaymentMethodsController
- NimbleshopCod::CodsController
- Defined in:
- app/controllers/nimbleshop_cod/cods_controller.rb
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/nimbleshop_cod/cods_controller.rb', line 7 def update alert_msg = if @payment_method.update_attributes(post_params[:cod]) msg = "Record has been updated" %Q[alert("#{msg}")] else msg = @payment_method.errors..first %Q[alert("#{msg}")] end respond_to do |format| format.js { render js: alert_msg } end end |