Convert executed SQL result to a list of Model object
Have your model inherit ActiveRecord::Base
class Model < ActiveRecord::Base
end
Then you can just do it like this
connection = ActiveRecord::Base.connection
sql = "select T1.f1, T2.f2 from T1 left join T2 on T1.id = T2.id"
@result = Model.find_by_sql(sql)
puts @result.f1