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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
fbac9e10
Commit
fbac9e10
authored
Nov 21, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Award: merge request fix
parent
e2d5f9a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/controllers/projects/notes_controller.rb
app/controllers/projects/notes_controller.rb
+5
-2
No files found.
app/controllers/projects/notes_controller.rb
View file @
fbac9e10
...
...
@@ -59,8 +59,11 @@ class Projects::NotesController < Projects::ApplicationController
end
def
award_toggle
noteable
=
note_params
[
:noteable_type
]
==
"issue"
?
Issue
:
MergeRequest
noteable
=
noteable
.
find_by!
(
id:
note_params
[
:noteable_id
],
project:
project
)
noteable
=
if
note_params
[
:noteable_type
]
==
"issue"
project
.
issues
.
find
(
note_params
[
:noteable_id
])
else
project
.
merge_requests
.
find
(
note_params
[
:noteable_id
])
end
data
=
{
author:
current_user
,
...
...
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