3 ms·
Of course, you could always use ActiveRecord's facility to drop down to SQL, and continue to use ActiveRecord where it is actually more convenient.
by superuser2 12y ago
Of course, you could always use ActiveRecord's facility to drop down to SQL, and continue to use ActiveRecord where it is actually more convenient.
- JohnBooty 12y agoAbsolutely! I have the above SQL code in a Postgres stored function, and call it via ActiveRecord's find_by_sql() and use it in one of my Message model's methods to populate a bunch of Message instances.