Show query db when run rails c

MongoDB:

In mod development => add code to file development.rb

Mongoid.logger = Logger.new(STDOUT)

 

MySQL:

In mod development => add code to file development.rb

ActiveRecord::Base.logger = Logger.new(STDOUT)
Advertisements