+1
On 28-Sep-07, at 10:52 PM, Jack Danger Canty wrote:
> Ahoy!
>
> Have you guys ever needed to do this?:
>
> Post.find(:all, ;include => :comments, :conditions =>
> {'comments.created_at ' => 14.days.ago..7.days.ago})
>
> Well, I certainly have. And I finally got around to patching
> sanitize_sql_hash_for_conditions() so rather than doing this:
> "SELECT ... WHERE posts.`comments.created_at` BETWEEN ..."
> it provides us with:
> "SELECT ... WHERE comments.created_at BETWEEN ..."
>
>
> And you can have the whole package for the low, low price of a +1.
>
> http://dev.rubyonrails.org/ticket/9733
>
> ::Jack Danger
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---