Jason Price
Jason Price

Reputation: 15

Sequel first and get?

Hello I have built the following query:

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

This returns the entire record, I just need one column named time. Something like:

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

Any ideas on this?

Upvotes: 1

Views: 378

Answers (1)

Amit Kumar Gupta
Amit Kumar Gupta

Reputation: 18587

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

Upvotes: 0

Related Questions