把需要的信息提出来存 session,oauth 我记得有 access_token 和 access_secret 还有不一定提供的 id 三个字符串,不至于把 cookie 撑爆。
存 session 是打算做什么?
我看最新版 spree 代码提供了个 require_zipcode? 的方法可以覆盖。
#8 楼 @aikko 这缓存空间可大了,没看到动态的部分。
comment 片段抽成局部模板,然后用 cache_digests https://github.com/rails/cache_digests
cache 没做好,太多 render 了。
:symbol
本身是个值,值为 :symbol
需要变量用 String,见 1 楼
memcache
这篇估计用得着
说说 PJAX,Turbolink,以及 Basecamp 的前端方案 http://blog.chloerei.com/articles/834b424d-talk-about-pjax-turbolink-and-basecamp
如果基本语法已经了解,要深入就元编程那本书。
我推荐总是把 sanitize 放在最后一步,除了管理员添加的内容(比如广告代码)其他不要考虑用 raw 和 html_safe。
拍照留念
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 14
def blank?
respond_to?(:empty?) ? empty? : !self
end
# File activesupport/lib/active_support/core_ext/object/blank.rb, line 19
def present?
!blank?
end
用 html 的 data 属性存,然后 js 取。
用系统的 cron https://github.com/javan/whenever