Class: Comable::Admin::ShipmentMethodsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Comable::Admin::ShipmentMethodsController
- Defined in:
- app/controllers/comable/admin/shipment_methods_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /admin/shipment_methods.
-
#destroy ⇒ Object
DELETE /admin/shipment_methods/1.
-
#edit ⇒ Object
GET /admin/shipment_methods/1/edit.
-
#index ⇒ Object
GET /admin/shipment_methods.
-
#new ⇒ Object
GET /admin/shipment_methods/new.
-
#show ⇒ Object
GET /admin/shipment_methods/1.
-
#update ⇒ Object
PATCH/PUT /admin/shipment_methods/1.
Instance Method Details
#create ⇒ Object
POST /admin/shipment_methods
27 28 29 30 31 32 33 34 35 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 27 def create @shipment_method = Comable::ShipmentMethod.new(shipment_method_params) if @shipment_method.save redirect_to comable.admin_shipment_method_url(@shipment_method), notice: 'Shipment method was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /admin/shipment_methods/1
48 49 50 51 52 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 48 def destroy @shipment_method = Comable::ShipmentMethod.find(params[:id]) @shipment_method.destroy redirect_to comable.admin_shipment_methods_url, notice: 'Shipment method was successfully destroyed.' end |
#edit ⇒ Object
GET /admin/shipment_methods/1/edit
22 23 24 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 22 def edit @shipment_method = Comable::ShipmentMethod.find(params[:id]) end |
#index ⇒ Object
GET /admin/shipment_methods
7 8 9 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 7 def index @shipment_methods = Comable::ShipmentMethod.all end |
#new ⇒ Object
GET /admin/shipment_methods/new
17 18 19 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 17 def new @shipment_method = Comable::ShipmentMethod.new end |
#show ⇒ Object
GET /admin/shipment_methods/1
12 13 14 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 12 def show @shipment_method = Comable::ShipmentMethod.find(params[:id]) end |
#update ⇒ Object
PATCH/PUT /admin/shipment_methods/1
38 39 40 41 42 43 44 45 |
# File 'app/controllers/comable/admin/shipment_methods_controller.rb', line 38 def update @shipment_method = Comable::ShipmentMethod.find(params[:id]) if @shipment_method.update(shipment_method_params) redirect_to comable.admin_shipment_method_url(@shipment_method), notice: 'Shipment method was successfully updated.' else render :edit end end |