How see the converted sql from ActiveRecord method in view, etc
Posted
by
Jak
on Super User
See other posts from Super User
or by Jak
Published on 2011-01-05T16:08:51Z
Indexed on
2011/01/05
16:56 UTC
Read the original article
Hit count: 178
ruby-on-rails
Hi All,
I will be happy if someone clear doubt, i can see objects in view by using <%= debug @object %> and lot of methods is there apart from view like .to_yml, etc
Is there any method available for seeing the converted sql from ActiveRecord method in view, etc. Although I can find it in console but it will confuse when we run multiple queries..
example:
User.find :all
it will produce
"SELECT * FROM users;"
in output console
But i want it in view are any other specific point like yml , etc ?
Thanks, Jak
© Super User or respective owner