I would like to know whether there is a way of viewing the sql submitted when the ‘Submit’ button is clicked in a rails form.
Thanks for any suggestion provided.
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.
Look in the log/development.rb file – you should be able to see the SQL of every request if you are in dev.
If you are in the console, enter this command at the start:
ActiveRecord::Base.logger = Logger.new(STDOUT)
And you the log comments will be output to your screen.