Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

:having conditions need sanitizing

#2158

The recently-introduced :having support isn't sanitizing the conditions, so whereas:

:having => 'sum(credit_limit) > 50'

works,

:having => ['sum(credit_limit) > ?', 50]

This is a bit of a hole since HAVING is almost always used with values, which will as often as not come in dynamically. The attached patch sanitizes them as for :conditions.

Reported by Will Bryant · March 6th, 2009 @ 10:16 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved

    (from [7fb7b48a1f771e50896a82d749a70922a18afae7]) Allow :having conditions to be sanitized like regular :condition. [#2158 :having conditions need sanitizing state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    March 6th, 2009 @ 10:30 PM