Class: TinOpener::DataSetsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- TinOpener::DataSetsController
- Defined in:
- app/controllers/tin_opener/data_sets_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 19 def create @data_set = DataSet.new(data_set_params) if @data_set.save redirect_to @data_set, notice: 'Data set was successfully created.' else @data_sets = DataSet.all render :index end end |
#destroy ⇒ Object
38 39 40 41 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 38 def destroy @data_set.destroy redirect_to data_sets_url, notice: 'Data set was successfully destroyed.' end |
#edit ⇒ Object
16 17 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 16 def edit end |
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 7 def index @data_sets = DataSet.all @data_set = DataSet.new end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 12 def show @records = @data_set.records end |
#update ⇒ Object
30 31 32 33 34 35 36 |
# File 'app/controllers/tin_opener/data_sets_controller.rb', line 30 def update if @data_set.update(data_set_params) redirect_to @data_set, notice: 'Data set was successfully updated.' else render :edit end end |