summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-05-10 16:24:38 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-05-14 18:53:57 +1100
commit774ea414847f8e201e8e30102f1bc852ec6bc714 (patch)
tree55e81c2764adeb104380bd5bf2af88216ad36a80
parent44e64a04beed89e08981352430efc13258b9aae8 (diff)
downloadgitlab-ce-774ea414847f8e201e8e30102f1bc852ec6bc714.tar.gz
Clean up `notes_controller`
-rw-r--r--app/controllers/projects/notes_controller.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb
index bc13b8ad7ba..4d4c2af2415 100644
--- a/app/controllers/projects/notes_controller.rb
+++ b/app/controllers/projects/notes_controller.rb
@@ -8,19 +8,6 @@ class Projects::NotesController < Projects::ApplicationController
before_action :authorize_create_note!, only: [:create]
before_action :authorize_resolve_note!, only: [:resolve, :unresolve]
- #
- # This is a fix to make spinach feature tests passing:
- # Controller actions are returned from AbstractController::Base and methods of parent classes are
- # excluded in order to return only specific controller related methods.
- # That is ok for the app (no :create method in ancestors)
- # but fails for tests because there is a :create method on FactoryBot (one of the ancestors)
- #
- # see https://github.com/rails/rails/blob/v4.2.7/actionpack/lib/abstract_controller/base.rb#L78
- #
- def create
- super
- end
-
def delete_attachment
note.remove_attachment!
note.update_attribute(:attachment, nil)