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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
538d780a
Commit
538d780a
authored
Feb 25, 2019
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename before_action name
parent
dac959fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
ee/app/controllers/groups/epics/notes_controller.rb
ee/app/controllers/groups/epics/notes_controller.rb
+2
-4
No files found.
ee/app/controllers/groups/epics/notes_controller.rb
View file @
538d780a
...
...
@@ -5,9 +5,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController
include
NotesHelper
include
ToggleAwardEmoji
# Re-defining the before_action set in NotesActions here without prepending pushes it farther down the callback stack
# and we do this here since we need variables instantiated in other before_actions
before_action
:normalize_create_params
,
only:
[
:create
]
before_action
:set_target_params
,
only:
[
:create
]
before_action
:epic
before_action
:authorize_create_note!
,
only:
[
:create
]
...
...
@@ -46,7 +44,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController
EpicNoteSerializer
.
new
(
project:
nil
,
noteable:
noteable
,
current_user:
current_user
)
end
def
normalize_create
_params
def
set_target
_params
params
[
:target_type
]
=
'Epic'
params
[
:target_id
]
=
epic
.
id
end
...
...
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