Sha256: 8910c7a130b405fd3f3d35fbee987f6c2a4aa4d7a1f31ae51609d2010b6971c9

Contents?: true

Size: 346 Bytes

Versions: 4

Compression:

Stored size: 346 Bytes

Contents

require 'spec_helper'

use_roles_strategy :embed_one_role

class User
  include Mongoid::Document  
  include Roles::Mongoid 
  
  strategy :embed_one_role, :role_class => :role, :config => :default
  role_class :role

  valid_roles_are :admin, :guest, :user
end

def api_name
  :embed_one_role
end

load 'roles_mongoid/strategy/api_examples.rb'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
roles_mongoid-0.3.5 spec/roles_mongoid/strategy/single/embed_one_role_spec.rb
roles_mongoid-0.3.4 spec/roles_mongoid/strategy/single/embed_one_role_spec.rb
roles_mongoid-0.3.3 spec/roles_mongoid/strategy/single/embed_one_role_spec.rb
roles_mongoid-0.3.2 spec/roles_mongoid/strategy/single/embed_one_role_spec.rb