Материал готовится,
пожалуйста, возвращайтесь позднее
пожалуйста, возвращайтесь позднее
If you want the console to display the SQL query that ActiveRecord executes just do the following (before you do anything else in the console):
$ script/console
>> ActiveRecord::Base.logger = Logger.new(STDOUT)
=> #
>> User.first
User Load (3.3ms) SELECT * FROM "users" ORDER BY last_name, first_name ASC LIMIT 1
Each call to ActiveRecord now logs all of its activity to STDOUT (e.g., the console), via your custom logger instance.
$ script/console
>> ActiveRecord::Base.logger = Logger.new(STDOUT)
=> #
>> User.first
User Load (3.3ms) SELECT * FROM "users" ORDER BY last_name, first_name ASC LIMIT 1
Each call to ActiveRecord now logs all of its activity to STDOUT (e.g., the console), via your custom logger instance.
Загрузка...
Выбрать следующее задание
Ты добавил
Выбрать следующее задание
Ты добавил