Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
774ea414
Commit
774ea414
authored
May 10, 2018
by
blackst0ne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up `notes_controller`
parent
44e64a04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
13 deletions
+0
-13
app/controllers/projects/notes_controller.rb
app/controllers/projects/notes_controller.rb
+0
-13
No files found.
app/controllers/projects/notes_controller.rb
View file @
774ea414
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment