Class: Admin::PrimerPanelsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Admin::PrimerPanelsController
- Defined in:
- app/controllers/admin/primer_panels_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 20 def create @primer_panel = PrimerPanel.new(primer_panel_params) respond_to do |format| if @primer_panel.save flash[:notice] = "Created '#{@primer_panel.name}'" format.html { redirect_to(admin_primer_panels_path) } else format.html { render action: 'new' } end end end |
#edit ⇒ Object
17 18 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 17 def edit end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 7 def index @primer_panels = PrimerPanel.all end |
#new ⇒ Object
13 14 15 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 13 def new @primer_panel = PrimerPanel.new(programs: default_programs) end |
#show ⇒ Object
11 12 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 11 def show end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/admin/primer_panels_controller.rb', line 33 def update respond_to do |format| if @primer_panel.update(primer_panel_params) flash[:notice] = 'Primer Panel was successfully updated.' format.html { redirect_to(admin_primer_panels_path) } else format.html { render action: 'edit' } end end end |