search for: approved_at

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

2006 Mar 14
3
Help doing find - look for nonempty habtm
...least one restaurant associated with them. Right now I''m using the following SQL query: SELECT DISTINCT(cuisines.*) FROM cuisines, restaurants, cuisines_restaurants WHERE cuisines.id = cuisines_restaurants.cuisine_id AND restaurants.id = cuisines_restaurants.restaurant_id AND restaurants.approved_at IS NOT NULL That''s working fine. I''d really like to make this a pure AR thing though so I can use the rest of the AR options. Any tips on how to make it happen? I''m using Rails 1.0, but have no problem going to Edge if that''ll make it easier. Pat