]> git.openstreetmap.org Git - rails.git/blob - app/models/user_role.rb
Look up names and emails case insensitively for authentication
[rails.git] / app / models / user_role.rb
1 class UserRole < ActiveRecord::Base
2   belongs_to :user
3
4   ALL_ROLES = ['administrator', 'moderator']
5
6   validates_inclusion_of :role, :in => ALL_ROLES
7   validates_uniqueness_of :role, :scope => :user_id
8 end