Re: [Rails] strange behavior with active relation any? method

2013-04-04 Thread DALVIR SINGH KHOSA
hola por favor yo quiero baja rubyonrails-talk este ymail gracias On 03/04/2013, Colin Law clan...@googlemail.com wrote: On 3 April 2013 20:58, John Merlino stoici...@aol.com wrote: In console, I run the following and any? returns true: drivers = Driver.select(drivers.*,

[Rails] strange behavior with active relation any? method

2013-04-03 Thread John Merlino
In console, I run the following and any? returns true: drivers = Driver.select(drivers.*, drivers.id).joins([:reports, :driving_habits]).where(extract(MONTH FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?, 3, 2013).uniq.order(drivers.id asc).page(2).per(1) drivers.any? = true This

Re: [Rails] strange behavior with active relation any? method

2013-04-03 Thread Colin Law
On 3 April 2013 20:58, John Merlino stoici...@aol.com wrote: In console, I run the following and any? returns true: drivers = Driver.select(drivers.*, drivers.id).joins([:reports, :driving_habits]).where(extract(MONTH FROM reports.time) = ? AND extract(YEAR FROM reports.time) = ?, 3,