-
Notifications
You must be signed in to change notification settings - Fork 297
Dev_Guide
saberma edited this page Sep 26, 2011
·
2 revisions
model中增加
accepts_nested_attributes_for :links
页面传递参数时,注意要使用 links_attributes
而不是links,否则会报错 ActiveSupport::HashWithIndifferentAccess
http://api.rubyonrails.org/classes/ActiveRecord/NestedAttributes/ClassMethods.html
请将以下内容加入 /etc/hosts
,以加快dns lookup时间
127.0.1.1 lvh.me checkout.lvh.me themes.lvh.me 127.0.1.1 smackaho.st shopqi.smackaho.st myshopqi.smackaho.st
log 'some message'
msg '新增成功!'
放在 app/models/key_values.rb
crud操作为新增、修改、删除,而不使用添加、编辑
表B只归属于表A,则将表B的迁徙脚本合并至表A
参考 db/migrate/20110417135410_create_link_lists.rb