Nope! It's strictly a style issue. As I explain in the video (or the book if you buy it), as a result of a conversation with Jim Weirich I'm starting to use "fail" once again.
validate_uniqueness is a system that is completely broken once you have more than 1 ruby process running against the same database. It just can't work the way you want it to.
You must add constraints to the database and handle the resulting exceptions to ensure unique values.
They really need to kill validate_uniqueness since it is so totally broken
I'm loving the recent explosion in self-published books, but as a (general) request: they are so, so much more useful when they come in multiple formats (mobi, epub and pdf).
FWIW we (getdpd.com) totally agree and are working on adding this feature to our system soon. Vendors will be able to upload the file variants themselves or we will do the conversion on the backend.
As I replied above, I'll probably work on Epub first because that's the format I got the most requests for when I did a survey. But after that I'd be happy to get some Mobi pointers. Email me!
It's shameless self-promotion, but my startup Leanpub (http://leanpub.com) lets you write in HTML or Markdown, embed external code samples, save your files in Dropbox and produce PDF, EPUB and MOBI with one click. We sell all 3 formats, with automatic update distribution to existing readers when you publish a new version (so you can sell your book while it's in progress). You keep the rights to your book, etc.
38 comments
[ 3.3 ms ] story [ 93.2 ms ] threadhttp://avdi.org/talks/exceptional-ruby-2011-02-04/
It's the little things.
Is there an actual difference between these methods?
You must add constraints to the database and handle the resulting exceptions to ensure unique values.
They really need to kill validate_uniqueness since it is so totally broken
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better." - Samuel Beckett
P.S. Would you mind getting in touch with me? I have a script to share with you guys.
avdi: let me know if you'd like any help packing a .mobi, I'm working on a quick-tutorial post.
You'll also get a .mobi version simultaneously.
;-)