0
字段太多我有一个查询,我只希望输出三个变量在查询输出
Relationship.select('follower_id as source, followed_id as target, value').map(&:attributes)
但是我得到的结果包括id变量如下,我不想。我如何摆脱它?
{"source"=>1, "target"=>3, "value"=>1, "id"=>nil},
{"source"=>1, "target"=>4, "value"=>1, "id"=>nil},
{"source"=>1, "target"=>5, "value"=>1, "id"=>nil},
{"source"=>2, "target"=>3, "value"=>1, "id"=>nil}