Class: Admin::Schools::ProgramsController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::Schools::ProgramsController
- Defined in:
- app/controllers/gaku/admin/schools/programs_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #new ⇒ Object
- #show_program_levels ⇒ Object
- #show_program_specialties ⇒ Object
- #show_program_syllabuses ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 15 def create @program = Program.new(program_params) @program.save @school.programs << @program set_count respond_with @program end |
#destroy ⇒ Object
31 32 33 34 35 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 31 def destroy @program.destroy set_count respond_with @program end |
#edit ⇒ Object
23 24 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 23 def edit end |
#new ⇒ Object
10 11 12 13 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 10 def new @program = Program.new respond_with @program end |
#show_program_levels ⇒ Object
37 38 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 37 def show_program_levels end |
#show_program_specialties ⇒ Object
40 41 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 40 def show_program_specialties end |
#show_program_syllabuses ⇒ Object
43 44 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 43 def show_program_syllabuses end |
#update ⇒ Object
26 27 28 29 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 26 def update @program.update(program_params) respond_with @program end |