Skip to content

Instantly share code, notes, and snippets.

@akirill0v
Created November 22, 2012 11:37
Show Gist options
  • Save akirill0v/4130709 to your computer and use it in GitHub Desktop.
Save akirill0v/4130709 to your computer and use it in GitHub Desktop.
class Role < ActiveRecord::Base
include RoleRepository
has_many :user_roles, :dependent => :destroy
has_many :users, :through => :user_roles
translate_methods :name
def to_sym
short_name.to_sym
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment