Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordixpac <dino.onex@gmail.com>2016-07-03 17:04:22 +0300
committerdixpac <dino.onex@gmail.com>2016-07-14 09:51:00 +0300
commite21492b810bf9cd30f0e60836c056a72e830f427 (patch)
treeaf13b1f7482ce738408e396c649134c7fab974f0 /lib/api/award_emoji.rb
parent7968484dfa363537e6e7822ca1ec100bcd0ec4f8 (diff)
Fix not normalized emoji paths
* There where path where +1 was stored as +1 not as thumbsup that was causing problems such as showing thumbsup icon 2 time. I fixed this to always normalize and store +1 as tumbsup
Diffstat (limited to 'lib/api/award_emoji.rb')
-rw-r--r--lib/api/award_emoji.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb
index c4fa1838b5a..2efe7e3adf3 100644
--- a/lib/api/award_emoji.rb
+++ b/lib/api/award_emoji.rb
@@ -56,9 +56,9 @@ module API
not_found!('Award Emoji') unless can_read_awardable?
- award = awardable.award_emoji.new(name: params[:name], user: current_user)
+ award = awardable.create_award_emoji(params[:name], current_user)
- if award.save
+ if award.persisted?
present award, with: Entities::AwardEmoji
else
not_found!("Award Emoji #{award.errors.messages}")