In the following,
@records = ActiveRecord::Base.connection.exec_query(sql)
The "sql" string is a call to a db function that returns a table.
This line of code returns #<ActiveRecord::Result:0x007fd90ba87460 @columns=["zip_code", "county", ..], @rows=[[94121, "San Francisco", ..], [94110, "San Francisco", ..], ..]
What can I do to get @records to be an ActiveRecord relation instead, so that I can use typical relation methods/syntax like
@records.each do |r| r.county, r.zip_code end