我的Gemfile中有pry-rails的gem。我想使用pry作为rails控制台,但下面没有这个文本。
如何清理我的rails控制台输出,现在我收到很多不必要的文本:
>> Subscription.where(user_id: User.last.id)
User Load (1.8ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
#<ActiveRecord::Relation:0x7f7f9ad69c70
@implicit_readonly = nil,
@join_dependency = nil,
@order_clause = nil,
@records = [],
@should_eager_load = nil,
attr_accessor :bind_values = [],
attr_accessor :create_with_value = {},
...发布于 2012-11-26 20:34:02
根据second Pry tip,您可以在表达式的末尾使用分号。
>> Subscription.where(user_id: User.last.id);
>>https://stackoverflow.com/questions/13255242
复制相似问题