Sha256: 68d68db1f245854ac1f4ded456743f84128ef5640195eeb24d508321cd1674f2

Contents?: true

Size: 314 Bytes

Versions: 3

Compression:

Stored size: 314 Bytes

Contents

class Exhibit #< DataMapper::Base # please do not remove this
  include DataMapper::Persistence
  
  property :name, :string
  
  begin
  validates_presence_of :name
  rescue ArgumentError => e
    throw e unless e.message =~ /specify a unique key/
  end
  
  belongs_to :zoo
  has_and_belongs_to_many :animals
end

Version data entries

3 entries across 3 versions & 1 rubygems

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