Class: Binda::RepeatersController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Binda::RepeatersController
- Defined in:
- app/controllers/binda/repeaters_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /repeaters.
-
#destroy ⇒ Object
DELETE /repeaters/1.
-
#edit ⇒ Object
GET /repeaters/1/edit.
-
#index ⇒ Object
GET /repeaters.
-
#new ⇒ Object
GET /repeaters/new.
-
#show ⇒ Object
GET /repeaters/1.
-
#update ⇒ Object
PATCH/PUT /repeaters/1.
Methods inherited from ApplicationController
#after_sign_in_path_for, #after_sign_out_path_for, #set_locale
Instance Method Details
#create ⇒ Object
POST /repeaters
26 27 28 29 |
# File 'app/controllers/binda/repeaters_controller.rb', line 26 def create @repeater = Repeater.new(repeater_params) @repeater.save end |
#destroy ⇒ Object
DELETE /repeaters/1
37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/binda/repeaters_controller.rb', line 37 def destroy @repeater.destroy! # redirect_to repeaters_url, notice: 'Repeater was successfully destroyed.' if params['isAjax'] render json: { target_id: params[:target_id] }, status: 200 else redirect_to :back, notice: 'Field group was successfully destroyed.' end end |
#edit ⇒ Object
GET /repeaters/1/edit
22 23 |
# File 'app/controllers/binda/repeaters_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /repeaters
8 9 10 |
# File 'app/controllers/binda/repeaters_controller.rb', line 8 def index @repeaters = Repeater.all end |
#new ⇒ Object
GET /repeaters/new
17 18 19 |
# File 'app/controllers/binda/repeaters_controller.rb', line 17 def new @repeater = Repeater.new end |
#show ⇒ Object
GET /repeaters/1
13 14 |
# File 'app/controllers/binda/repeaters_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /repeaters/1
32 33 34 |
# File 'app/controllers/binda/repeaters_controller.rb', line 32 def update @repeater.update(repeater_params) end |