]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user_role.rb
Use correct title in og:title for pages with no title
[rails.git] / app / models / user_role.rb
index c4d703530220bac59cc59f9f96b5db47e7213227..9686f7250bdc7234173dad784686811420422594 100644 (file)
@@ -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