Rails Rails 5.2.0 RC1: Active Storage, Redis Cache Store, HTTP/2 Early Hints, CSP, Credentials

huacnlee · January 31, 2018 · Last by nuanshuidai replied at May 03, 2018 · 4889 hits

RubyChina 是不是尝鲜了?

可以考虑支持 http2 了

刚发现 Elixir 的 plug 也开始加入 http2 了

SpringBoot 2.0 RC 也加入了 HTTP/2 了。

Reply to huacnlee

华顺哥动作好快,我的还停在 dev 机器呢...

Reply to huacnlee

是不是说,查询一组 User 的时候若要获得头像,还得加 eager loading 了?

用套娃缓存。

Reply to jasl

对,这样有好处,可以自由增加各种各样的附件类型,无需调整数据库。

class Post < ApplicationRecord
  has_one_attached :image

  has_one_attached :cover
  has_many_attached :images
  has_many_attached :attachments
end
13 Floor has deleted

今天试了下Bootsnap,开启速度毫无变化……

Active Storage 不支持校验或者事务,这一点上还是无法替代 Carrierwave

direct_upload: true 的功能很方便,全交给客户端直接往云服务器上传,避免经过服务器,只需要这么一行:

<%= form.file_field :avatar, direct_upload: true %>

Boot large Ruby/Rails apps faster

n5ken in Rails 文章功能设计 mention this topic. 05 Feb 13:22
huacnlee in Rails 5.2.0 Released mention this topic. 10 Apr 11:19
Reply to huacnlee

你用了之后觉得到底好用不?值得改用不?

You need to Sign in before reply, if you don't have an account, please Sign up first.