One thing I learned about ActiveRecord today (yesterday)
ActiveRecord::Base.find_by_sql -- This kind of method inevitably becomes useful when using an ORM. Convenience is nice, and it's nice to try to avoid the situation altogether but eventually you'll have a feature asking too complex a question of the database to match the relationships in your domain straight up.
Things to watch out for when using find_by_sql:
You have to explicitly select all the attributes of your model that you're interested in accessing. If you don't, you'll get this: "Unknown Attribute: attribute_name" <- THIS IS THE THING I LEARNED TODAY (yesterday)
If your result set has members of different models, they will all be attributes of the model you called find_by_sql on













