Sha256: 145aa486966ae46e0bfa0eda355686adb2a892fb39014c8f0c07e21d28cf347f

Contents?: true

Size: 360 Bytes

Versions: 4

Compression:

Stored size: 360 Bytes

Contents

if defined? DataMapper::Resource

class Role
  include DataMapper::Resource
  property :id, Serial
  property :name, String
  has n, :users
  property :created_at, DateTime
  property :updated_at, DateTime
end

elsif defined? Sequel::Model

class Role < Sequel::Model
  one_to_many :users
end

else

class Role < ActiveRecord::Base
  has_many :users
end
 
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
netzke-basepack-0.7.7 test/basepack_test_app/app/models/role.rb
netzke-basepack-zh-0.7.6 test/basepack_test_app/app/models/role.rb
netzke-basepack-0.7.6 test/basepack_test_app/app/models/role.rb
netzke-basepack-0.7.5 test/basepack_test_app/app/models/role.rb