On 14.01.2009, at 11:38, heda wrote:

> I guess a better idea might be to use it as a block
>
> class Model
>  include DataMapper::Resource
>
>  property :id, Serial
>
>  without_auto_validations do
>   property :x, String
>   property :y, String
>  end
>
>  property :name, String
> end
>
> Any thoughts?


What if we just add something like default_property_options? It can be  
used just like
default_repository class method. This would be much simpler to  
implement and to follow
(since scope does not change).

Then each property call will simply merge given values with a hash of  
defaults you defined on your class.
It won't affect performance either, because it is a boot time code, so  
we can extend it to idea of contexts used
by other parts of DM.

What do you think?

MK


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