Query Problem, limiting list results

in controller write like this

    @friend = User.find(params[:id])
    @friends = User.find(:all, :conditions => ["LIKE ?", <what u want
to find>])

Kumar: Not sure how this helps with limiting the results. "WHERE
LIKE ..." isn't valid SQL either.

Cass: Stack trace shows line 24 to be the problem. The controller code
you posted is syntactically valid ruby/rails (except that you should
just do :limit => 5 rather than "5") so it's hard to tell why you're
getting that error. Which line is line 24?

Do you have your has_many :friends in the User model? My thought is
that you may be mistakenly calling Enumerable#find (which takes 1
argument) rather than AR::Base#find (which takes 2).

The rest of the stack trace should show you whether or not
AR::Base#find is being called.