X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..5f495b43d18bfa7a9bcaf918aa4db15261bea46a:/app/models/user_role.rb diff --git a/app/models/user_role.rb b/app/models/user_role.rb index c4d703530..9686f7250 100644 --- a/app/models/user_role.rb +++ b/app/models/user_role.rb @@ -3,6 +3,5 @@ class UserRole < ActiveRecord::Base ALL_ROLES = %w(administrator moderator) - validates_inclusion_of :role, :in => ALL_ROLES - validates_uniqueness_of :role, :scope => :user_id + validates :role, :inclusion => ALL_ROLES, :uniqueness => { :scope => :user_id } end