-
- Downloads
Fix Error 500 when application settings are saved
Due to a Rails bug, fetching the application settings from Redis may prevent the attribute methods from being loaded for the `ApplicationSetting` model. More details here: https://github.com/rails/rails/issues/27348 There was also a secondary problem introduced by overriding these association methods which caused all default visibility levels to be set to `nil`. Before, the previous implementation allowed the string "20" to be saved as an integer, while now a table lookup happens before that. We fix this by enforcing the integer value in the controller and default to PRIVATE. Closes #29674
Showing
- app/controllers/admin/application_settings_controller.rb 12 additions, 0 deletionsapp/controllers/admin/application_settings_controller.rb
- app/models/application_setting.rb 9 additions, 0 deletionsapp/models/application_setting.rb
- spec/features/admin/admin_settings_spec.rb 8 additions, 0 deletionsspec/features/admin/admin_settings_spec.rb
Please register or sign in to comment