Class: Gaku::NotesController
- Inherits:
-
GakuController
- Object
- CoreController
- GakuController
- Gaku::NotesController
- Defined in:
- app/controllers/gaku/notes_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Methods inherited from GakuController
Instance Method Details
#create ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/gaku/notes_controller.rb', line 20 def create @note = @notable.notes.new(note_params) @note.save set_count respond_with @note end |
#destroy ⇒ Object
38 39 40 41 42 |
# File 'app/controllers/gaku/notes_controller.rb', line 38 def destroy @note.destroy set_count respond_with @note end |
#edit ⇒ Object
27 28 |
# File 'app/controllers/gaku/notes_controller.rb', line 27 def edit end |
#index ⇒ Object
10 11 12 13 |
# File 'app/controllers/gaku/notes_controller.rb', line 10 def index @notes = @notable.notes respond_with @notes end |
#new ⇒ Object
15 16 17 18 |
# File 'app/controllers/gaku/notes_controller.rb', line 15 def new @note = Note.new respond_with @note end |
#show ⇒ Object
30 31 |
# File 'app/controllers/gaku/notes_controller.rb', line 30 def show end |
#update ⇒ Object
33 34 35 36 |
# File 'app/controllers/gaku/notes_controller.rb', line 33 def update @note.update(note_params) respond_with @note end |