Class: Gaku::StudentSelectionController
- Inherits:
-
GakuController
- Object
- CoreController
- GakuController
- Gaku::StudentSelectionController
- Defined in:
- app/controllers/gaku/student_selection_controller.rb
Instance Method Summary collapse
- #add ⇒ Object
- #clear ⇒ Object
- #collection ⇒ Object
- #index ⇒ Object
- #remove ⇒ Object
- #remove_collection ⇒ Object
Methods inherited from GakuController
Instance Method Details
#add ⇒ Object
9 10 11 12 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 9 def add @selection = @user_selection.add(@student) respond_with @selection end |
#clear ⇒ Object
34 35 36 37 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 34 def clear @selection = @user_selection.remove_all respond_with @selection end |
#collection ⇒ Object
20 21 22 23 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 20 def collection @selection = @user_selection.collection(@students) render 'index' end |
#index ⇒ Object
30 31 32 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 30 def index @selection = @user_selection.students end |
#remove ⇒ Object
14 15 16 17 18 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 14 def remove @selection = @user_selection.remove(@student) set_count respond_with @selection end |
#remove_collection ⇒ Object
25 26 27 28 |
# File 'app/controllers/gaku/student_selection_controller.rb', line 25 def remove_collection @selection = @user_selection.remove_collection(@students) render 'index' end |