If I remove dm-validations it works like a charm. Bug?

require "dm-core"
require "dm-validations"
require "dm-migrations"


class C
  include DataMapper::Resource

  property :id, Serial
  property :name, String, :required => true
  validates_uniqueness_of :name
  property :valid, Integer, :default => true
end


def setup
  DataMapper::Logger.new($stdout, :debug)
  DataMapper.setup(:default, 'sqlite::memory:')
  DataMapper.finalize
  DataMapper.auto_migrate!

  C.first_or_create(:name => "test", :valid => true)
end

if __FILE__ == $0
  setup
  puts C.all.map(&:name)
end

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/9eFDkUwvL_UJ.
To post to this group, send email to datamapper@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to