ROR heroku PostGres issue

Posted by oelbrenner on Stack Overflow See other posts from Stack Overflow or by oelbrenner
Published on 2010-04-24T04:04:54Z Indexed on 2010/04/24 4:13 UTC
Read the original article Hit count: 302

Filed under:
|
|
|

getting error: ActiveRecord::StatementInvalid (PGError: ERROR: argument of HAVING must be type boolean, not type timestamp without time zone

controller code snippet:

def inactive @number_days = params[:days].to_i || 90 @clients = Client.find(:all, :include => :appointments, :conditions => ["clients.user_id = ? AND appointments.start_time <= ?", current_user.id, @number_days.days.ago], :group => 'client_id', :having => 'MAX(appointments.start_time)' ) end

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails