Hey Michael

Yeah, I see what you're saying. default_property_options should
probably be a block though rather than a method to allow different
sets of defaults

I literally finished doing a without_auto_validations block moments
before I saw your reply so I uploaded it to basecamp anyways

http://datamapper.lighthouseapp.com/projects/20609-datamapper/tickets/766

On Jan 14, 10:34 am, Michael Klishin <[email protected]>
wrote:
> 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