summaryrefslogtreecommitdiff
path: root/app/controllers/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 11:55:55 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-12 11:55:55 +0100
commit63144cd062f6d259f1f30b6e06eb92a16caa8dec (patch)
tree01d5b571d3b5cb056a48767064c9145fdf5ceee1 /app/controllers/projects
parent8ab5df9d872414b2cca3ebd16d57b89e2f19e06a (diff)
parent1974087114f3f365d16547c8a5c3ec2e03a66104 (diff)
downloadgitlab-ce-63144cd062f6d259f1f30b6e06eb92a16caa8dec.tar.gz
Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list
Avoid render edit_form in each notes.
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/notes_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb
index 41cd08c93c6..0c98e2f1bfd 100644
--- a/app/controllers/projects/notes_controller.rb
+++ b/app/controllers/projects/notes_controller.rb
@@ -3,7 +3,7 @@ class Projects::NotesController < Projects::ApplicationController
before_action :authorize_read_note!
before_action :authorize_create_note!, only: [:create]
before_action :authorize_admin_note!, only: [:update, :destroy]
- before_action :find_current_user_notes, except: [:destroy, :delete_attachment]
+ before_action :find_current_user_notes, except: [:destroy, :edit, :delete_attachment]
def index
current_fetched_at = Time.now.to_i
@@ -29,6 +29,11 @@ class Projects::NotesController < Projects::ApplicationController
end
end
+ def edit
+ @note = note
+ render layout: false
+ end
+
def update
@note = Notes::UpdateService.new(project, current_user, note_params).execute(note)