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



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

#destroyObject



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

#editObject



30
31
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 30

def edit
end

#indexObject



12
13
14
15
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 12

def index
  @programs = @school.programs
  respond_with @programs
end

#newObject



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_levelsObject



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

def show_program_levels
end

#show_program_specialtiesObject



47
48
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 47

def show_program_specialties
end

#show_program_syllabusesObject



50
51
# File 'app/controllers/gaku/admin/schools/programs_controller.rb', line 50

def show_program_syllabuses
end

#updateObject



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