Class: Students::ClassGroupEnrollmentsController
- Inherits:
-
GakuController
- Object
- GakuController
- Students::ClassGroupEnrollmentsController
- Defined in:
- app/controllers/gaku/students/class_group_enrollments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/gaku/students/class_group_enrollments_controller.rb', line 14 def create @class_group_enrollment = @student.class_group_enrollments.create(enrollment_params) set_count respond_with @class_group_enrollment end |
#destroy ⇒ Object
24 25 26 27 28 29 |
# File 'app/controllers/gaku/students/class_group_enrollments_controller.rb', line 24 def destroy @class_group_enrollment = Gaku::Enrollment.find(params[:id]) @class_group_enrollment.destroy! set_count respond_with @class_group_enrollment end |
#index ⇒ Object
20 21 22 |
# File 'app/controllers/gaku/students/class_group_enrollments_controller.rb', line 20 def index @class_group_enrollments = @student.class_group_enrollments end |
#new ⇒ Object
9 10 11 12 |
# File 'app/controllers/gaku/students/class_group_enrollments_controller.rb', line 9 def new @class_group_enrollment = @student.class_group_enrollments.build respond_with @class_group_enrollment end |