Skip to content
Snippets Groups Projects
Commit c6bb2545 authored by tmn21's avatar tmn21 :rocket:
Browse files

ISSUE #50: FIX level to turn into curator

parent a4e819f7
No related branches found
No related tags found
1 merge request!47ISSUE #50: FIX level to turn into curator
Pipeline #34403 failed
...@@ -359,8 +359,8 @@ class User < ApplicationRecord ...@@ -359,8 +359,8 @@ class User < ApplicationRecord
new_level, remaining_xp = calculate_level(xp) new_level, remaining_xp = calculate_level(xp)
self.level = new_level self.level = new_level
#if the new level is more than 5, give him curator role #if the new level is more than 3 or equal, give them curator role
if new_level >= 5 && !self.is_curator? if new_level >= 3 && !self.is_curator?
self.roles << Role.find_by(name: 'curator') self.roles << Role.find_by(name: 'curator')
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment