Rails 3+
Enter this line in the console:
ActiveRecord::Base.logger = Logger.new(STDOUT)
Rails 2
Enter this line in the console:
ActiveRecord::Base.connection.instance_variable_set :@logger, Logger.new(STDOUT)
More Related Contents:
- Is there a way to get a collection of all the Models in your Rails app?
- Case-insensitive search in Rails model
- ActiveRecord Query Union
- Rails model without database
- ActiveRecord OR query Hash notation
- ActiveRecord, has_many :through, and Polymorphic Associations
- Using Rails serialize to save hash to database
- Rails 3: Get Random Record
- Rails: select unique values from a column
- Setting session timeout in Rails 3
- How to handle Ruby on Rails error: “Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'”
- Rails find_or_create_by more than one attribute?
- Overriding id on create in ActiveRecord
- How do i work with two different databases in rails with active records?
- Rails ActiveRecord: Find All Users Except Current User
- GroupingError: ERROR: column must appear in the GROUP BY clause or be used in an aggregate function
- belongs_to through associations
- Check if record exists from controller in Rails
- Rails 4 nested attributes and has_many :through associaton in a form
- Renaming the created_at, updated_at columns of ActiveRecord/Rails
- Grouping by week/month/etc & ActiveRecord?
- delete_all vs destroy_all?
- ActiveRecord serialize using JSON instead of YAML
- How to implement Active Record inheritance in Ruby on Rails?
- Store the day of the week and time?
- Non persistent ActiveRecord model attributes
- Rails: Overriding ActiveRecord association method
- How do I avoid a race condition in my Rails app?
- How can I use ActiveRecord on a database that has a column named ‘valid’? (DangerousAttributeError)
- Specifying column name in a “references” migration