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
Léo-Paul Géneau
gitlab-ce
Commits
6a16697a
Commit
6a16697a
authored
Oct 13, 2016
by
Paco Guzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Execute specific named route method from toggle_award_url helper method
parent
4e6af0c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
app/helpers/award_emoji_helper.rb
app/helpers/award_emoji_helper.rb
+6
-3
No files found.
CHANGELOG.md
View file @
6a16697a
...
@@ -53,6 +53,7 @@ Please view this file on the master branch, on stable branches it's out of date.
...
@@ -53,6 +53,7 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Add Issue Board API support (andrebsguedes)
-
Add Issue Board API support (andrebsguedes)
-
Allow the Koding integration to be configured through the API
-
Allow the Koding integration to be configured through the API
-
Add new issue button to each list on Issues Board
-
Add new issue button to each list on Issues Board
-
Execute specific named route method from toggle_award_url helper method
-
Added soft wrap button to repository file/blob editor
-
Added soft wrap button to repository file/blob editor
-
Update namespace validation to forbid reserved names (.git and .atom) (Will Starms)
-
Update namespace validation to forbid reserved names (.git and .atom) (Will Starms)
-
Show the time ago a merge request was deployed to an environment
-
Show the time ago a merge request was deployed to an environment
...
...
app/helpers/award_emoji_helper.rb
View file @
6a16697a
module
AwardEmojiHelper
module
AwardEmojiHelper
def
toggle_award_url
(
awardable
)
def
toggle_award_url
(
awardable
)
if
@project
return
url_for
([
:toggle_award_emoji
,
awardable
])
unless
@project
url_for
([
:toggle_award_emoji
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
awardable
])
if
awardable
.
is_a?
(
Note
)
# We render a list of notes very frequently and calling the specific method is a lot faster than the generic one (6.5x)
toggle_award_emoji_namespace_project_note_url
(
namespace_id:
@project
.
namespace_id
,
project_id:
@project
.
id
,
id:
awardable
.
id
)
else
else
url_for
([
:toggle_award_emoji
,
awardable
])
url_for
([
:toggle_award_emoji
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
awardable
])
end
end
end
end
end
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