ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 900 forks source link

Enable config.load_defaults in rails application.rb and determine which defaults we need to modify #23172

Open jrafanie opened 2 months ago

jrafanie commented 2 months ago

We currently disable loading defaults for one known reason, belongs_to_required_by_default. It's hard to know or remember if there are others we need to change from the defaults. We should try to enable defaults and manually undo specific defaults we still need the old behavior.

As of right now, it's hard to tell what changes we have from the defaults. At least if we enumerate our needed changes, we can try to fix each one separately and move our application closer to the defaults.

EDIT: Note, rails documents the defaults for each version here: https://guides.rubyonrails.org/configuring.html#versioned-default-values

Fryguy commented 2 months ago

FWIW, when I changed the manageiq-schema dummy app to Rails 7.0, this was one of the ones I kept in place:

You can see how we load the defaults, and then change 2 settings here: https://github.com/ManageIQ/manageiq-schema/blob/688930bd09ae0c39a91edc8a6770d41234563749/spec/dummy/config/application.rb