Sha256: f3c14c95e796a9ccd50811ed4971fc02679d76e4d0b5952e3e4ee3d131ed6627

Contents?: true

Size: 408 Bytes

Versions: 3

Compression:

Stored size: 408 Bytes

Contents

# This uses the inheritance method of declaring
# a model to boost spec coverage and ensure that the to
# ways of declaring a model are compatible within the
# same project and/or object graphs.
class User < DataMapper::Base
  
  property :name, :string
  property :email, :string, :format => :email_address
  has_many :comments, :class => 'Comment', :foreign_key => 'user_id'
  
  after_create { false }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
datamapper-0.3.0 spec/models/user.rb
datamapper-0.3.1 spec/models/user.rb
datamapper-0.3.2 spec/models/user.rb