diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-07-31 08:32:49 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-07-31 08:32:49 +0300 |
commit | 5926bbac12d5831e1ad90964272b96e152a72e34 (patch) | |
tree | e222160f8f35e7dd772dbd124eef089592efc9c2 /app/controllers/notes_controller.rb | |
parent | 69e41250d1b1eea609ae63f2702d5888396cba9a (diff) | |
download | gitlab-ce-5926bbac12d5831e1ad90964272b96e152a72e34.tar.gz |
Backend Refactoring
Diffstat (limited to 'app/controllers/notes_controller.rb')
-rw-r--r-- | app/controllers/notes_controller.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 1c997e380a0..e8e4bb544a8 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -15,11 +15,7 @@ class NotesController < ApplicationController end def create - @note = @project.notes.new(params[:note]) - @note.author = current_user - @note.notify = true if params[:notify] == '1' - @note.notify_author = true if params[:notify_author] == '1' - @note.save + @note = Notes::CreateContext.new(project, current_user, params).execute respond_to do |format| format.html {redirect_to :back} @@ -40,6 +36,6 @@ class NotesController < ApplicationController protected def notes - @notes = NotesLoad.new(project, current_user, params).execute + @notes = Notes::LoadContext.new(project, current_user, params).execute end end |