]> git.openstreetmap.org Git - rails.git/blob - app/models/user_role.rb
Require i18n version 0.4.1 and fix monkey patch to work with it
[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