Sha256: faba01bef280dd71d7f3a8b7f4d27aa150b967ad50efbeaf48413406df1283cc

Contents?: true

Size: 213 Bytes

Versions: 5

Compression:

Stored size: 213 Bytes

Contents

class User
  include Mongoid::Document

  belongs_to :trole, :class_name => 'Role'
  
  field :name  
end

class Role
  include Mongoid::Document  

  has_many :users, :class_name => 'User'
  
  field :name  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
troles-0.6.1 spec/mongoid/models/ref_one.rb
troles-0.6.0 spec/mongoid/models/ref_one.rb
troles-0.5.2 spec/mongoid/models/ref_one.rb
troles-0.5.1 spec/mongoid/models/ref_one.rb
troles-0.5.0 spec/mongoid/models/ref_one.rb