To turn it off:
old_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
To turn it back on:
ActiveRecord::Base.logger = old_logger
More Related Contents:
- Rails raw SQL example
- PostgreSQL GROUP BY different from MySQL?
- MySQL not using indexes with WHERE IN clause?
- Best way to count rows by arbitrary time intervals
- ActiveRecord Arel OR condition
- LEFT OUTER JOIN in Rails 4
- Rails 3 execute custom sql query without a model
- Perform this hours of operation query in PostgreSQL
- Join multiple tables with active records
- PostgreSQL where all in array
- SQL where joined set must contain all values but may contain more
- Find records where join doesn’t exist
- Rails 4 LIKE query – ActiveRecord adds quotes
- Find all records which have a count of an association greater than zero
- Rails find record with zero has_many records associated [duplicate]
- Prepared Statement on Postgresql in Rails
- ActiveRecord find_each combined with limit and order
- SQL Server dynamic PIVOT query?
- Is SELECT or INSERT in a function prone to race conditions?
- MySQL get row position in ORDER BY
- SQL Server Process Queue Race Condition
- SQL Server 2005 Pivot on Unknown Number of Columns
- Using Stored Procedure in Classical ASP .. execute and get results
- SQL Server Convert Varchar to Datetime
- Select TOP X (or bottom) percent for numeric values in MySQL
- Difference of two date time in sql server
- Is it possible to see the structure of mulitple table with a single “desc”.
- SQL: Select rows with a column value that occurs at least N times?
- Historical / auditable database
- How to automatically generate unique id in SQL like UID12345678?