Class: CarrierTypeHasCheckoutTypesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- CarrierTypeHasCheckoutTypesController
- Defined in:
- app/controllers/carrier_type_has_checkout_types_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /carrier_type_has_checkout_types POST /carrier_type_has_checkout_types.json.
-
#destroy ⇒ Object
DELETE /carrier_type_has_checkout_types/1 DELETE /carrier_type_has_checkout_types/1.json.
-
#edit ⇒ Object
GET /carrier_type_has_checkout_types/1/edit.
-
#index ⇒ Object
GET /carrier_type_has_checkout_types GET /carrier_type_has_checkout_types.json.
-
#new ⇒ Object
GET /carrier_type_has_checkout_types/new GET /carrier_type_has_checkout_types/new.json.
-
#show ⇒ Object
GET /carrier_type_has_checkout_types/1 GET /carrier_type_has_checkout_types/1.json.
-
#update ⇒ Object
PUT /carrier_type_has_checkout_types/1 PUT /carrier_type_has_checkout_types/1.json.
Instance Method Details
#create ⇒ Object
POST /carrier_type_has_checkout_types POST /carrier_type_has_checkout_types.json
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 46 def create @carrier_type_has_checkout_type = CarrierTypeHasCheckoutType.new(carrier_type_has_checkout_type_params) respond_to do |format| if @carrier_type_has_checkout_type.save flash[:notice] = t('controller.successfully_created', model: t('activerecord.models.carrier_type_has_checkout_type')) format.html { redirect_to @carrier_type_has_checkout_type } format.json { render json: @carrier_type_has_checkout_type, status: :created, location: @carrier_type_has_checkout_type } else format.html { render action: "new" } format.json { render json: @carrier_type_has_checkout_type.errors, status: :unprocessable_entity } end end end |
#destroy ⇒ Object
DELETE /carrier_type_has_checkout_types/1 DELETE /carrier_type_has_checkout_types/1.json
80 81 82 83 84 85 86 87 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 80 def destroy @carrier_type_has_checkout_type.destroy respond_to do |format| format.html { redirect_to carrier_type_has_checkout_types_url } format.json { head :no_content } end end |
#edit ⇒ Object
GET /carrier_type_has_checkout_types/1/edit
41 42 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 41 def edit end |
#index ⇒ Object
GET /carrier_type_has_checkout_types GET /carrier_type_has_checkout_types.json
9 10 11 12 13 14 15 16 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 9 def index @carrier_type_has_checkout_types = CarrierTypeHasCheckoutType.page(params[:page]) respond_to do |format| format.html # index.html.erb format.json { render json: @carrier_type_has_checkout_types } end end |
#new ⇒ Object
GET /carrier_type_has_checkout_types/new GET /carrier_type_has_checkout_types/new.json
29 30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 29 def new @carrier_type_has_checkout_type = CarrierTypeHasCheckoutType.new @carrier_type_has_checkout_type.carrier_type = @carrier_type @carrier_type_has_checkout_type.checkout_type = @checkout_type respond_to do |format| format.html # new.html.erb format.json { render json: @carrier_type_has_checkout_type } end end |
#show ⇒ Object
GET /carrier_type_has_checkout_types/1 GET /carrier_type_has_checkout_types/1.json
20 21 22 23 24 25 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 20 def show respond_to do |format| format.html # show.html.erb format.json { render json: @carrier_type_has_checkout_type } end end |
#update ⇒ Object
PUT /carrier_type_has_checkout_types/1 PUT /carrier_type_has_checkout_types/1.json
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 64 def update respond_to do |format| if @carrier_type_has_checkout_type.update(carrier_type_has_checkout_type_params) flash[:notice] = t('controller.successfully_updated', model: t('activerecord.models.carrier_type_has_checkout_type')) format.html { redirect_to @carrier_type_has_checkout_type } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @carrier_type_has_checkout_type.errors, status: :unprocessable_entity } end end end |