Skip to content

add load_defaults option to example_app#2949

Merged
nickcharlton merged 1 commit into
thoughtbot:mainfrom
goosys:fix/load_defaults
Jun 26, 2026
Merged

add load_defaults option to example_app#2949
nickcharlton merged 1 commit into
thoughtbot:mainfrom
goosys:fix/load_defaults

Conversation

@goosys

@goosys goosys commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

To ensure tests run correctly on each Rails version, I think it's better to set load_defaults accordingly.

I tried setting it, but it resulted in a large number of errors. I plan to fix them gradually over time.
Once all errors are resolved, I will open a PR.

If you have any concerns or a different direction in mind, please let me know.

@goosys goosys marked this pull request as draft December 3, 2025 02:58
@goosys goosys force-pushed the fix/load_defaults branch from 8296493 to 8aff034 Compare December 3, 2025 15:23
@goosys goosys changed the title WIP: add load_defaults option to example_app add load_defaults option to example_app Dec 3, 2025
@goosys

goosys commented Feb 20, 2026

Copy link
Copy Markdown
Contributor Author

@nickcharlton nickcharlton added the dependencies changes or issues relating to a dependency label Mar 25, 2026
@goosys goosys force-pushed the fix/load_defaults branch from 8aff034 to 28c4191 Compare March 26, 2026 10:10
@goosys goosys marked this pull request as ready for review March 26, 2026 10:18
@goosys

goosys commented Mar 26, 2026

Copy link
Copy Markdown
Contributor Author

@nickcharlton

  • Enabled load_defaults to be set per Rails version
  • Removed configuration values set by load_defaults from config/application.rb
    • This eliminates the warnings that were appearing at runtime
    • DEPRECATION WARNING: `config.active_support.to_time_preserves_timezone` is 
      deprecated and will be removed in Rails 8.2 (called from <top (required)> at 
      /workspaces/administrate/spec/example_app/config/environment.rb:5)
      
  • Fixed the issues that were causing errors

@goosys goosys force-pushed the fix/load_defaults branch 2 times, most recently from 37fa665 to 198f6cf Compare March 26, 2026 14:00
By enabling the correct set of defaults to be loaded with each Rails
version, we expect to get more accurate tests. By a nice addition, this
also fixes deprecation warnings we see, such as:

    DEPRECATION WARNING: `config.active_support.to_time_preserves_timezone` is
    deprecated and will be removed in Rails 8.2 (called from <top (required)> at
    /workspaces/administrate/spec/example_app/config/environment.rb:5)

This also fixes some specs which failed because of the change.
@nickcharlton

Copy link
Copy Markdown
Member

Thanks! I eventually got around to looking at this properly and merging it!

@nickcharlton nickcharlton merged commit c929c83 into thoughtbot:main Jun 26, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies changes or issues relating to a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants