On Thursday, March 21, 2013 2:33:24 AM UTC, Rob Biedenharn wrote:
>
>
> On Mar 20, 2013, at 6:04 PM, John Merlino wrote:
>
> > I have this query:
> >
> > Report.
> >joins(:alerts).
> >joins(:alert_code).
>
> I think that you're looking for 'includes' ra
On Mar 20, 2013, at 6:04 PM, John Merlino wrote:
> I have this query:
>
> Report.
>joins(:alerts).
>joins(:alert_code).
I think that you're looking for 'includes' rather than 'joins' for these
associations.
Report.includes({:alerts => :alert_code}).
To
I have this query:
Report.
joins(:alerts).
joins(:alert_code).
where(:unit_id => unit_id).
where{time < my{self.time}}.
where("alert_codes.name LIKE ?", "%Inside virtual
fence%").
3 matches
Mail list logo