Forum: Ruby on Rails wanna make a catalog list

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E3b1a696613226cc5ecc828f0bda900c?d=identicon&s=25 vanquisher (Guest)
on 2007-06-22 12:33
(Received via mailing list)
Hi All,
I have a model called colleges, that contains college name,
speciality, location, articles on colleges, etc.
So, I want to create a catalog for users to browse.

I want a listing based on location, speciality, name, etc. And want to
display articles related to these fields.
If I do a SELECT DISTINCT, everytime I display the page, this will
take query all the fields and it takes time.

In the sense, i am doing
@colleges = College.find(:all, :select=>"DISTINCT location")

Is there a better way of doing this? Should I have a seperate table
for the statistics?
Please help me with this.

This topic is locked and can not be replied to.