1

こんにちは、次のクエリを作成しました。

patron.where.first(:Queued => 1)

これにより、レコード全体が返されます。必要なのは、という名前の列が 1 つだけですtime。何かのようなもの:

patron.where.first(:Queued => 1).get(:time)

これに関するアイデアはありますか?

4

1 に答える 1

0
patron.where(:Queued => 1).select(:time).first
于 2012-11-09T03:20:17.767 に答える