Skip to content

Fix: use to_prepare to reset SMS config

Martin Tan请求将fix/area-codes-nil-2合并到main-jh

related !625 (merged)

What does this MR do and why?

It's recommended to use Rails.application.config.to_prepare to reload constants or reset settings on boot and on each reload according to Rails Guides of version 7.0.3.

For Rails 6.1.3 we can use Rails.application.reloader.to_prepare from the guides of v6.1.0 since we are using 6.1.4.7 specified in Gemfile. We also have examples in GitLab about this usage, such as /config/initializers/lograge.rb#L5

  • Revert the changes from !625 (merged)
  • Use Rails.application.reloader.to_prepare to set SMS config after reloading

Screenshots or screen recordings

No UI Changes

How to set up and validate locally

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Martin Tan 编辑于

合并请求报告

加载中