Class: Comable::Admin::CustomersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Comable::Admin::CustomersController
- Includes:
- PermittedAttributes
- Defined in:
- app/controllers/comable/admin/customers_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#edit ⇒ Object
18 19 |
# File 'app/controllers/comable/admin/customers_controller.rb', line 18 def edit end |
#index ⇒ Object
10 11 12 13 |
# File 'app/controllers/comable/admin/customers_controller.rb', line 10 def index @q = Comable::Customer.ransack(params[:q]) @customers = @q.result.page(params[:page]).accessible_by(current_ability) end |
#show ⇒ Object
15 16 |
# File 'app/controllers/comable/admin/customers_controller.rb', line 15 def show end |
#update ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/controllers/comable/admin/customers_controller.rb', line 21 def update if @customer.update_attributes(customer_params) redirect_to comable.admin_customer_path(@customer), notice: Comable.t('successful') else flash.now[:alert] = Comable.t('failure') render :edit end end |