mix-rails-auth/app/models/role.rb in mix-rails-0.22.0 vs mix-rails-auth/app/models/role.rb in mix-rails-0.23.0
- old
+ new
@@ -1,19 +1,6 @@
-class Role
- include Mongoid::Document
-
- has_and_belongs_to_many :users
+class Role < ActiveRecord::Base
+ has_and_belongs_to_many :users, :join_table => :users_roles
belongs_to :resource, :polymorphic => true
-
- field :name, :type => String
- index({ :name => 1 }, { :unique => true })
-
-
- index({
- :name => 1,
- :resource_type => 1,
- :resource_id => 1
- },
- { :unique => true})
scopify
end