Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
# config/init.rb dependency "dm-validations" # model class Author include DataMapper::Resource property :email, String, :nullable => false, :unique => true, :format => :email_address, :key => true end >> a1 = Author.fixtures[0] => #<Author homepage="http://botablog.cz" first_name="Jakub" last_name="Šťastný" nickname="Botanicus" admin=true email="knava.bestvinensi@gmail.com" password="password"> >> a1.save => true >> a2 = a1.dup => #<Author homepage="http://botablog.cz" first_name="Jakub" last_name="Šťastný" nickname="Botanicus" admin=true email="knava.bestvinensi@gmail.com" password="password"> >> a2.save => false >> a2.errors => #<DataMapper::Validate::ValidationErrors:0x20054a4 @errors={}>
This paste will be private.
From the Design Piracy series on my blog: