a while back i mentioned it in #datamapper and they didn't want to
change the semantics of #errors which is reasonable.

On Aug 16, 7:47 pm, arbales <[email protected]> wrote:
> why not put those relationship errors into obj.errors. If it's not
> saving, it has an error, sort of illogical to have to look elsewhere
> (IMHO)
>
> arb
>
> On Aug 16, 11:31 am, franco <[email protected]> wrote:
>
>
>
> > is there a general case way to find out if a resource's relationship
> > is failing validation?
>
> > i often find myself doing something like this:
>
> > obj.save => false
> > obj.valid? => true
>
> > obj.foo.save => false
> > obj.foo.valid? => true
>
> > obj.foo.bar.save => false
> > obj.foo.bar.valid? => false
> > obj.foo.bar.errors => something useful
>
> > unless already implemented somewhere it would be nice to have
> > something like
>
> > obj.save => false
> > obj.valid? => true
> > obj.relationship_errors => array all objects in the relationship graph
> > that have valid? == false

-- 
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