翻墙看看。
#3 楼 @ihlayy 没场景讨论不了。应该先把这里看一次 http://guides.rubyonrails.org/caching_with_rails.html
要给出场景才知道要用什么缓存机制啊。
如果是缓存一个查询
def something_need_to_cache
Rails.cache.fetch('some_key') do
where(CONDITIONS).to_a
end
end
http://html2slim.herokuapp.com/
input#fileupload data-url=manage_images_path multiple="" name="files[]" type="file"
#6 楼 @moliliang 这是谈主机稳定性还是中国特色的网络稳定性?如果是后者那没个准的。
vpn
这段 js 是放在什么位置执行的,估计跟 turbolinks 有关。
搞掂。
http://guides.rubyonrails.org/i18n.html#active-model-methods
ActiveModel::Errors#full_messages prepends the attribute name to the error message using a separator that will be looked up from errors.format (and which defaults to "%{attribute} %{message}").
你如果要输出 model 的校验信息,应该用 model.errors.full_messages
来取得,里面已经指定了对应词条和属性名字。
我觉得你误解了 t 的用法,t 'errors.template.header'
的意思是找到 'errors.template.header'
这个词条,后面的参数是作为变量传到词条字符串里的。在顶楼信息中 'errors.template.header'
并不是一个词条,或者 t 有什么高级用法我不知道。
'errors.template.header'
这个词条没出现在你贴的 yml 文件里啊。
#43 楼 @huangling02 企业号或个人号都行,个人号限制多。需要有线上的网站提交审核。
很少人会回答这个问题:
我这篇讲 UJS 的博客还能用
<%= render 'follow_icon', product: product %>
<%= render partial: 'follow_icon', locals: { product: product } %>
NOTICE: This library has been renamed and retired in September 2013 (read the explanation). It is not considered compatible with Elasticsearch 1.x.
Have a look at the http://github.com/elasticsearch/elasticsearch-rails suite of gems, which contain similar set of features for ActiveModel/Record and Rails integration as Tire.
建议:
现在是最好的订阅时机,7 美元看几百篇文章。
css 放 javascripts 文件夹确实有问题,浏览器开调试,Network 栏,那个 css 文件应该无法找到。
#1 楼 @blacktulip 3.0.5 还没有 assets pipeline。