如何制作rails控制台并没有向我展示sqlite咨询

时间:2014-06-02 20:06:48

标签: ruby-on-rails ruby-on-rails-4 ruby-on-rails-3.2

您好朋友我想问他们如何制作rails控制台 不向我展示sqlite咨询

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">

我不想展示这个

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

1 个答案:

答案 0 :(得分:1)

在控制台类型中:

ActiveRecord::Base.logger = nil