]> git.openstreetmap.org Git - rails.git/blob - app/models/user_role.rb
Use link_to and form_tag instead of link_to_remote and form_remote_tag
[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