Class: Admin::Schools::ProgramsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/gaku/admin/schools/programs_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

#destroyObject



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

#editObject



23
24
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 23

def edit
end

#newObject



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_levelsObject



37
38
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 37

def show_program_levels
end

#show_program_specialtiesObject



40
41
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 40

def show_program_specialties
end

#show_program_syllabusesObject



43
44
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 43

def show_program_syllabuses
end

#updateObject



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