摘要: 今天coding的时候遇到一个未知的类型,于是用puts logo_params.class查了下数据类型,然后google了一下发现是 Strong Parameter Strong parameters机制是rails4.0新引入的。 接下来我们看看它的用法:(简单例子) rail3.0是这样的 阅读全文
posted @ 2013-08-01 21:55 lmei 阅读(965) 评论(0) 推荐(0) 编辑
摘要: Need to add image attachments to a model? See how with paperclip in this episode. 在命令行输入: 注:product是你要添加属性的models中的.rb文件名,photo是要插入的图片在数据表中的属性名 配置mode 阅读全文
posted @ 2013-08-01 21:22 lmei 阅读(810) 评论(0) 推荐(0) 编辑