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
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 45 def create @carrier_type_has_checkout_type = CarrierTypeHasCheckoutType.new(params[:carrier_type_has_checkout_type]) 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
79 80 81 82 83 84 85 86 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 79 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
40 41 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 40 def edit end |
#index ⇒ Object
GET /carrier_type_has_checkout_types GET /carrier_type_has_checkout_types.json
8 9 10 11 12 13 14 15 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 8 def index @carrier_type_has_checkout_types = CarrierTypeHasCheckoutType.all 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
28 29 30 31 32 33 34 35 36 37 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 28 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
19 20 21 22 23 24 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 19 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
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'app/controllers/carrier_type_has_checkout_types_controller.rb', line 63 def update respond_to do |format| if @carrier_type_has_checkout_type.update_attributes(params[:carrier_type_has_checkout_type]) 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 |