我在这里面临一个小问题。 我取使用下面的代码数据的数据,布尔验证
class CreateGrounddetails < ActiveRecord::Migration
def change
create_table :grounddetails do |t|
t.string :name
t.datetime :working_hours
t.string :address
t.string :contact_no
t.string :email
t.integer :number_of_grounds
t.text :description
t.boolean :featured_ground #Featured
t.timestamps null: false
end
end
end
我有一个存储在域“featured_ground”一个布尔值,现在我想只获取其是否有“featured_ground“真”值数据”。 我该如何做到这一点?
预先感谢您。
检查生成的SQL我想有地面我period..how能做到这一点是一定时间真? –