diff options
author | Valery Sizov <valery@gitlab.com> | 2017-03-03 21:24:16 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-03-03 21:24:16 +0300 |
commit | 5bf2ab73ba1a812b90ec50be676378eb0ae58fa8 (patch) | |
tree | 932cef8cd4d5063df10828cf4a02c0c31c631bb2 /app/services/issuable_base_service.rb | |
parent | 32538def144f88a68c5cdfbe7cb7cb2866bce932 (diff) | |
parent | df63d9db40e568bcca87cf7946cf518684538a31 (diff) |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into orderable-issues
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r-- | app/services/issuable_base_service.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb index dcb4a96d16a..b071a398481 100644 --- a/app/services/issuable_base_service.rb +++ b/app/services/issuable_base_service.rb @@ -203,6 +203,7 @@ class IssuableBaseService < BaseService change_state(issuable) change_subscription(issuable) change_todo(issuable) + toggle_award(issuable) filter_params(issuable) old_labels = issuable.labels.to_a old_mentioned_users = issuable.mentioned_users.to_a @@ -263,6 +264,14 @@ class IssuableBaseService < BaseService end end + def toggle_award(issuable) + award = params.delete(:emoji_award) + if award + todo_service.new_award_emoji(issuable, current_user) + issuable.toggle_award_emoji(award, current_user) + end + end + def has_changes?(issuable, old_labels: []) valid_attrs = [:title, :description, :assignee_id, :milestone_id, :target_branch] |