Displaying 1 result from an estimated 1 matches for "items_per_feed".
2006 Jul 15
3
How bad is it to have 7 joins in my find_by_sql?
My question is whether there''s a more idiomatic rails way of
structuring this query or of redoing the underlying models. First,
the ugly find_by_sql code, which is the method to generate an atom feed:
def atom
items_per_feed = 15
sql_query = "SELECT activities.*, users.real_name AS real_name,
accounts.last_scraped_at AS last_scraped_at,
accounts.total_miles as account_miles,
origins.name AS origin_name, origins.code AS origin_code,
destinations.name
AS destination_name, destinations.c...