Question

Hello friends I want to ask them how to make rails console does not show me the sqlite consult

Loading development environment (Rails 4.0.5)
2.0.0-p481 :001 > last_user=User.last
User Load (0.3ms)  SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
=> #<User id: 5, name: "Juan", email: "Lopez", created_at: "2014-06-02 19:50:48",      updated_at: "2014-06-02 19:50:48">

I do not want to show this

User Load (0.3ms)  SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
Was it helpful?

Solution

In console type:

ActiveRecord::Base.logger = nil
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top