3

I am issuing an SQL statement in console:

> sql = "SELECT flavour from Libation where id=8675309"
> result = ActiveRecord::Base.connection.execute(sql)
=> true

Am using the oracle enhanced adapter, and wonder why I only get true. I was expecting something like "mango". I have tried many things and no luck.

2
  • Have you tried select_all instead of execute? Commented Aug 5, 2014 at 22:42
  • @Nishu - reply with an answer and I will pick you. I feel silly now that I did not think of this. Commented Aug 5, 2014 at 22:56

1 Answer 1

6

Use select_all instead of execute to fetch results.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.