Sha256: 2ea33e43f73a07416234f9f4804dabe4b32a5d761eee636ca4d743819d06605c
Contents?: true
Size: 527 Bytes
Versions: 4
Compression:
Stored size: 527 Bytes
Contents
module Radmin def self.table_name_prefix; "radmin_"; end class User < ActiveRecord::Base devise :database_authenticatable, :recoverable, :trackable, :validatable attr_accessible :email, :password, :password_confirmation, :role_ids has_many :assignments, :class_name => "Radmin::Assignment", :dependent => :destroy, :foreign_key => "radmin_user_id" has_many :roles, :through => :assignments def role_symbols roles.map do |role| role.name.underscore.to_sym end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
radmin-0.3.3 | app/models/radmin/user.rb |
radmin-0.3.2 | app/models/radmin/user.rb |
radmin-0.3.1 | app/models/radmin/user.rb |
radmin-0.2.0 | app/models/radmin/user.rb |