Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
slicebo123
on Sept 22, 2019
|
parent
|
context
|
favorite
| on:
What ORMs have taught me: just learn SQL (2014)
You can execute a "non-model" query like so:
results = ActiveRecord::Base.connection.execute(sql)
philwelch
on Sept 28, 2019
[–]
The API docs don’t make it clear whether that’s still possible so I didn’t mention it explicitly, but I have done that before and that’s what I was alluding to with the “array of hash tables” comment.
Join us for
AI Startup School
this June 16-17 in San Francisco!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
results = ActiveRecord::Base.connection.execute(sql)