Class: Students::StudentSpecialtiesController

Inherits:
GakuController
  • Object
show all
Defined in:
app/controllers/gaku/students/student_specialties_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



15
16
17
18
19
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 15

def create
  @student_specialty = @student.student_specialties.create!(student_specialty_params)
  set_count
  respond_with @student_specialty
end

#destroyObject



35
36
37
38
39
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 35

def destroy
  @student_specialty.destroy
  set_count
  respond_with @student_specialty
end

#editObject



21
22
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 21

def edit
end

#indexObject



29
30
31
32
33
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 29

def index
  @student_specialties = @student.student_specialties
  set_count
  respond_with @student_specialties
end

#newObject



10
11
12
13
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 10

def new
  @student_specialty = StudentSpecialty.new
  respond_with @student_specialty
end

#updateObject



24
25
26
27
# File 'app/controllers/gaku/students/student_specialties_controller.rb', line 24

def update
  @student_specialty.update(student_specialty_params)
  respond_with @student_specialty
end