:select broken with will_paginate
Reported by darix | November 8th, 2007 @ 10:42 PM
@users = User.paginate :page => params[:page], :order => 'login', :per_page => 30 , :select => 'login, fullname'
gives you the following SQL error.
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' fullname) AS count_login_fullname FROM users' at line 1: SELECT count(login, fullname) AS count_login_fullname FROM users
User.find :select => 'login, fullname'
SELECT login, fullname FROM users