Commit 538d780a authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Rename before_action name

parent dac959fc
...@@ -5,9 +5,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController ...@@ -5,9 +5,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController
include NotesHelper include NotesHelper
include ToggleAwardEmoji include ToggleAwardEmoji
# Re-defining the before_action set in NotesActions here without prepending pushes it farther down the callback stack before_action :set_target_params, only: [:create]
# and we do this here since we need variables instantiated in other before_actions
before_action :normalize_create_params, only: [:create]
before_action :epic before_action :epic
before_action :authorize_create_note!, only: [:create] before_action :authorize_create_note!, only: [:create]
...@@ -46,7 +44,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController ...@@ -46,7 +44,7 @@ class Groups::Epics::NotesController < Groups::ApplicationController
EpicNoteSerializer.new(project: nil, noteable: noteable, current_user: current_user) EpicNoteSerializer.new(project: nil, noteable: noteable, current_user: current_user)
end end
def normalize_create_params def set_target_params
params[:target_type] = 'Epic' params[:target_type] = 'Epic'
params[:target_id] = epic.id params[:target_id] = epic.id
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment