Monday, June 28, 2010

Ruby: Additional Attributes in ActiveRecord

I'm a bit surprised that this returns a string instead of an int:
Book.find_by_sql("select name, 5 as some_number from books").first.some_number
My buddy Shailen was the one who pointed this out to me.

No comments: