摘要: Defines the name of the table column which will store the class name on single-table inheritance situations. The default inheritance column name is ty 阅读全文
posted @ 2016-09-12 16:44 冰凌花花~ 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 使用 callback 确保创建,更新和删除 Picture 时,touch 关联的 imageable,使得其缓存能正确过期 这个update的方法用来把update时间强制更新成当前时间 http://guides.rubyonrails.org/association_basics.html 阅读全文
posted @ 2016-09-12 14:19 冰凌花花~ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: https://github.com/rails/jbuilder 的set!方法重构接口, 因为grape没法使用 jBuilder 的缓存,所以直接用 Rails 写 API (1)多个图片 原来的方法为 精简后为 (2)hints 是一个 hash,遍历 Hash 的文档 http://rub 阅读全文
posted @ 2016-09-12 14:02 冰凌花花~ 阅读(214) 评论(0) 推荐(0) 编辑