> As I mentioned in an earlier post, my suggestion is that one uses create()
> when all validations are expected to pass, and new/save in all other cases.
>
> Another way of putting this: create() is supposed to provide a quickie way
> to create a saved model instance. If you are checking for errors, it's not
> quickie :-)

I must admit I find having the unsaved model returned very handy for
debugging unexpected problems with ruby-debug as you actually have
something you can look at to see why it's failed.

If you feel strongly about this why not write a plugin for datamapper
that exhibits this behavior (it would be pretty trivial to implement).
 If you do this and it's heavily used then I'm sure you'll have more
leverage in trying to add this behavior into datamapper itself -
although I presume this would still be difficult as it'd be a fairly
major change to the public api that could potentially break peoples
code.

My two-penneth

Rupes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to