安全性更新 / 功能參數調整 / Rails 7.0.2 has been released

Ruby on Rails 真新手區

,

Rail 7 的安全性更新跟注意事項

https://rubyonrails.org/2022/2/8/Rails-7-0-2-has-been-released

First, one feature that was introduced in 7.0.0 was removed, the ability to pass a service_name param to DirectUploadsController. This feature was causing significant issues when upgrading from Rails 6.1, so the Rails team decided to remove it while we work in a backward compatible change. You can read more about the original feature in the original pull request and about the problems in the related issue. We don’t take this decision lightly, and usually don’t remove features after they are released without a proper deprecation cycle, but at this time we decided to prioritize making it easier for people to upgrade.

影響範圍

這三個情境同時存在,才會受影響

  • active storage (actiontext) 上傳檔案
  • 有不同地方(S3, GCS,...)存放檔案,每次都需要指定存放位置
  • 有使用 Dirct uploads

參考資料

移除的參數

1644889113-rails7022_1.png

多個存放檔案 (Multi-provider)

1644889113-rails7022_2.png