Rails WEBrick shows raw SQL statements for any ActiveRecord activities. How to enable that in the console?
Rails WEBrick shows raw SQL statements for any ActiveRecord activities. How to enable that
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To do this you have to enable logger, you could do this as follows.
Open the rails console:
Have a look at this link:
http://rubyquicktips.com/post/292826666/display-activerecord-generated-sql-queries-in-the