search for: pairings_stories

Displaying 1 result from an estimated 1 matches for "pairings_stories".

2006 Apr 19
3
newbie question : select distinct in model
Hi guys, I''m new so be gentle :-) How do I put the following into a method inside a model.... select distinct(pairing_id), description from pairings_stories, pairings where pairing_id = pairings.id order by description I basically want to have a @pairlist = Pairing.UniqueBookList line in a controller. Just not sure how to wire up this method in the model. And do I use find_by_sql or is there a nice rails/ruby technique rather than using the...