Rupert,

> My understanding from the wikki is that where you don't supply a
> context the validation is added to a context called :default.
> Validations will only be run in this context if you either specify the
> :default context or if you don't supply a context - i.e. it isn't a
> global context it is an actual context just like any explicit contexts
> you define.

There is a bit of a precedence set in dm-core.  When you specify a
property or relationships in the model without using an explicit
repository block it puts them into the :default repository.  The
properties and relationships in the :default repository are actually
copied over and available when working with the model in other
repositories.  In a way it acts like a default place to store that
stuff globally.

Granted, we're not talking about repositories, but rather validation
contexts.  As someone familiar with dm-core, but not as much with dm-
validations internals, I sort of assumed that when you don't specify
the context that it would be available globally.  Michael is the
maintainer, so he can probably chime in with his thoughts, but that
would be my assumption given how dm-core works.

--

Dan
(dkubb)
--~--~---------~--~----~------------~-------~--~----~
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