On Feb 13, 2011, at 1:36 PM, Robert Pankowecki wrote:

> Wouldn't it be possible to implement the sexy api with blocks ?
> 
> var = 12
> 
> # meta_where
> User.where(:id.gt > var)
> 
> # another implementation
> User.condition { id.gt > var }
> 
> Evaluate the the block in different scope in which title method would
> be definied to return some object responding to :gt, :lt and other
> nice methods...
> 
> If that's possible, maybe that's our goal ?
> 
> Robert Pankowecki


I actually fiddled around with this in my current work on a rewrite of 
MetaWhere. The problem is that once you start looking to handle nested 
associations and the like, things start looking pretty ridiculously verbose. 
Couldn't come up with a DSL I liked.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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/rubyonrails-core?hl=en.

Reply via email to