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
- #index ⇒ Object
- #new ⇒ Object
- #show_program_levels ⇒ Object
- #show_program_specialties ⇒ Object
- #show_program_syllabuses ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 22 def create @program = Program.new(program_params) @program.save @school.programs << @program set_count respond_with @program end |
#destroy ⇒ Object
38 39 40 41 42 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 38 def destroy @program.destroy set_count respond_with @program end |
#edit ⇒ Object
30 31 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 30 def edit end |
#index ⇒ Object
12 13 14 15 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 12 def index @programs = @school.programs respond_with @programs end |
#new ⇒ Object
17 18 19 20 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 17 def new @program = Program.new respond_with @program end |
#show_program_levels ⇒ Object
44 45 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 44 def show_program_levels end |
#show_program_specialties ⇒ Object
47 48 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 47 def show_program_specialties end |
#show_program_syllabuses ⇒ Object
50 51 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 50 def show_program_syllabuses end |
#update ⇒ Object
33 34 35 36 |
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 33 def update @program.update(program_params) respond_with @program end |