diff --git a/app/models/user.rb b/app/models/user.rb index 79c83f7bcf4..7023a7956d1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -912,11 +912,11 @@ class User < ActiveRecord::Base end def access_level=(new_level) - new_level = new_level.to_s - return unless %w(admin regular).include?(new_level) + new_level = new_level.to_s + return unless %w(admin regular).include?(new_level) - self.admin = (new_level == 'admin') - end + self.admin = (new_level == 'admin') + end private