0
所以我想在Ruby中粗糙了设计,所以我跑Ruby on Rails的ActiveRecord的模型没有显示“黑名单”字段
ruby script/generate scaffold item name:string description:text model:string manufacturers_name:string category:string weight:decimal upc:string ebay_cat_id:string blacklist:bool in_discovery:bool archived:bool
唯一的问题是,没有一个布尔值字段是上该模型。如果我使用Ruby脚本/拼箱和运行
item = Item.new
我得到
#<Item id: nil, name: nil, description: nil, model: nil, manufacturers_name: nil, category: nil, weight: nil, upc: nil, ebay_cat_id: nil, created_at: nil, updated_at: nil>
是否有将有多少个字段显示对象上的限制吗?我知道这些字段是在数据库中创建的...双重检查。
想想吧,日期时间戳也不在对象上。对我有什么提示?我是否必须手动为这些或者什么写入访问器?
谢谢...猜我刚刚错过了。再次感谢。 – Boushley 2010-02-26 05:41:49
对我来说,它似乎很奇怪,它只是静静地死去......或者有没有记录我只是不检查? – Boushley 2010-02-26 06:00:33