spec/support/models.rb in cancannible-0.0.1 vs spec/support/models.rb in cancannible-0.0.2
- old
+ new
@@ -9,37 +9,37 @@
:scope => [:resource_id, :resource_type,
:permissible_id, :permissible_type]
end
class Member < ActiveRecord::Base
- include Cancannible
+ include Cancannible::Grantee
end
class User < ActiveRecord::Base
has_many :roles_users, class_name: 'RolesUsers'
- has_many :roles, :through => :roles_users
+ has_many :roles, through: :roles_users
belongs_to :group
- include Cancannible
+ include Cancannible::Grantee
inherit_permissions_from :roles, :group
end
class RolesUsers < ActiveRecord::Base
belongs_to :role
belongs_to :user
end
class Role < ActiveRecord::Base
has_many :roles_users, :class_name => 'RolesUsers'
- has_many :users, :through => :roles_users
+ has_many :users, through: :roles_users
- include Cancannible
+ include Cancannible::Grantee
end
class Group < ActiveRecord::Base
has_many :users
- include Cancannible
+ include Cancannible::Grantee
end
class Widget < ActiveRecord::Base
end