X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2d22ab10f759828e27876f138b419ff4c0913b87..dbe165bbb3d6eda37d9579f1ac767599f9055607:/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