Grant system badges in a background job.

This commit is contained in:
Vikhyat Korrapati
2014-06-17 12:37:46 +05:30
parent b3f403952b
commit b5eea1d79f
3 changed files with 28 additions and 17 deletions

View File

@ -60,7 +60,7 @@ class Promotion
@user.user_profile.recook_bio
@user.user_profile.save!
Group.user_trust_level_change!(@user.id, @user.trust_level)
BadgeGranter.update_badges(@user, trust_level: @user.trust_level)
BadgeGranter.update_badges(action: :trust_level_change, user_id: @user.id)
end
true