Class: ActiveBatch::BatchesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActiveBatch::BatchesController
- Defined in:
- app/controllers/active_batch/batches_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /batches.
-
#destroy ⇒ Object
DELETE /batches/1.
-
#index ⇒ Object
GET /batches.
-
#new ⇒ Object
GET /batches/new.
-
#show ⇒ Object
GET /batches/1.
Instance Method Details
#create ⇒ Object
POST /batches
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/active_batch/batches_controller.rb', line 22 def create @batch = Batch.new(batch_params) if @batch.save redirect_to @batch, notice: 'Batch was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /batches/1
33 34 35 36 |
# File 'app/controllers/active_batch/batches_controller.rb', line 33 def destroy @batch.destroy redirect_to batches_url, notice: 'Batch was successfully destroyed.' end |
#index ⇒ Object
GET /batches
8 9 10 |
# File 'app/controllers/active_batch/batches_controller.rb', line 8 def index @batches = Batch.all end |
#new ⇒ Object
GET /batches/new
17 18 19 |
# File 'app/controllers/active_batch/batches_controller.rb', line 17 def new @batch = Batch.new end |
#show ⇒ Object
GET /batches/1
13 14 |
# File 'app/controllers/active_batch/batches_controller.rb', line 13 def show end |