Add support for ignoring nil values in Jbuilder scope#580
Draft
moritonal wants to merge 3 commits into
Draft
Conversation
Author
|
Okay, so it's not just me, the actions are all failing on |
Author
|
Okay, Ruby isn't my primary language so any advice is welcome on how to improve this. But it should fix up the issue whereby nested |
Author
|
Attempts to solve #363 |
JuanVqz
added a commit
to fastruby/points
that referenced
this pull request
May 5, 2026
jbuilder 2.11.x calls require "active_support/proxy_object" at
load time. proxy_object was deprecated in Rails 5 and removed in
Rails 8.0, so the require raises LoadError the moment Bundler
runs Bundler.require for the :default group:
LoadError: cannot load such file -- active_support/proxy_object
config/application.rb:7:in `<top (required)>'
jbuilder 2.12 dropped the require (jbuilder commit b8e2d8f),
2.13 added explicit Rails 8 support. Bumping the floor to 2.13
resolves cleanly on both 7.2 (current) and 8.0 (next), so this
sits as a prereq before the Rails version flip.
Conservative resolution kept all other gems pinned.
Ref: rails/jbuilder#580
etagwerker
pushed a commit
to fastruby/points
that referenced
this pull request
Jul 17, 2026
* Bump Rails 7.1.5.1 → 7.1.6 * Switch show_exceptions to symbol value for Rails 7.2 Rails 7.2 changes config.action_dispatch.show_exceptions from a boolean to a symbol. Boolean values stop working at the 7.2 bump. - true -> :all - false -> :none - new option -> :rescuable (raise non-rescuable, render rescuable) The test environment used `false` (raise everything). The 1:1 replacement is :none. Symbol form already works on 7.1, so this is a direct rewrite with no dual-boot conditional needed. Ref: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-action-dispatch-show-exceptions * Drop Rails.application.secrets in favor of credentials/ENV Rails 7.2 removes Rails.application.secrets entirely. Anything that relied on config/secrets.yml stops working at the bump. Currently the file only carries secret_key_base, which Rails resolves through this chain (in order): 1. Rails.application.credentials.secret_key_base 2. ENV["SECRET_KEY_BASE"] 3. tmp/local_secret.txt (dev/test auto-generated) Production already uses ENV["SECRET_KEY_BASE"] (unchanged). Dev/test fall through to tmp/local_secret.txt automatically, so deleting secrets.yml is safe. Also drops config.read_encrypted_secrets = true from production.rb, which is a no-op in 7.2 and only ever applied to the legacy secrets.yml.enc workflow. Ref: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#rails-application-secrets-removal * Bump rspec-rails ~> 6.0.3 → ~> 6.1 for fixture_paths support Rails 7.2 deprecates fixture_path (singular) in favor of fixture_paths (plural array). The new API exists in Rails 7.1+, but rspec-rails surfaces it via config.fixture_paths only from 6.1.0 onward — 6.0.x still expects fixture_path. Bumping the floor to 6.1 unblocks the fixture_paths rewrite that follows in the next commit. 6.1.5 resolves cleanly on both sides of the dual-boot pair (7.1.6 and 7.2.3) with no other gem changes pulled in beyond the rspec-rails sub-gems on the .next side. * Rename fixture_path → fixture_paths in rspec config Rails 7.2 deprecates the singular fixture_path setter on ActiveSupport::TestCase. rspec-rails 6.1+ exposes the plural form, which takes an array of paths and is the long-term API on both 7.1 and 7.2. Direct rewrite — no NextRails.next? branch needed, and no behavior change since we still point at a single spec/fixtures directory. Ref: https://github.com/rspec/rspec-rails/blob/main/Changelog.md#610--2023-11-21 * Bump database_cleaner-active_record 2.1.0 → 2.2.2 for Rails 7.2 database_cleaner-active_record 2.1.x calls AR connection adapter#schema_migration, which Rails 7.2 removed in favor of an internal-pool-based API. The 2.1.x suite errors out on boot under 7.2 with: NoMethodError: undefined method `schema_migration' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter ...> 2.2.0 reworked the cleanup to use the new connection API. 2.2.2 is the latest patch and resolves cleanly on both 7.1.6 and 7.2.3. Doing the bump as its own commit so the Rails version flip in the next commit is isolated to the Gemfile constraint change. Ref: https://github.com/DatabaseCleaner/database_cleaner-active_record/blob/main/CHANGELOG.md * Upgrade Rails 7.1.6 → 7.2.3.1 Flips the Gemfile constraint from ~> 7.1.0 to ~> 7.2.0 and collapses the dual-boot if/else into a single line, since both sides of the dual-boot pair now point at 7.2 anyway. The next? helper (Gemfile lines 3-5) and the Gemfile.next symlink stay in place. They will be retired in a follow-up cleanup pass once 7.2 ships, per the dual-boot teardown checklist — keeping them now keeps build-rails-next in CI as a sanity check on the exact same constraints as build-rails-current. All fix-before-bump items were addressed in earlier commits in this branch: - show_exceptions symbol value - Rails.application.secrets removal - rspec-rails fixture_paths support - database_cleaner-active_record schema_migration compat Test suite is 204/204 green on 7.2.3.1. * Bump jbuilder ~> 2.5 → ~> 2.13 for Rails 8 compat jbuilder 2.11.x calls require "active_support/proxy_object" at load time. proxy_object was deprecated in Rails 5 and removed in Rails 8.0, so the require raises LoadError the moment Bundler runs Bundler.require for the :default group: LoadError: cannot load such file -- active_support/proxy_object config/application.rb:7:in `<top (required)>' jbuilder 2.12 dropped the require (jbuilder commit b8e2d8f), 2.13 added explicit Rails 8 support. Bumping the floor to 2.13 resolves cleanly on both 7.2 (current) and 8.0 (next), so this sits as a prereq before the Rails version flip. Conservative resolution kept all other gems pinned. Ref: rails/jbuilder#580 * Upgrade Rails 7.2.3.1 → 8.0.5 Flips the Gemfile constraint from ~> 7.2.0 to ~> 8.0.0 and collapses the dual-boot if/else into a single line. Both sides of the dual-boot pair (Gemfile and Gemfile.next via symlink) now target 8.0. Detection against the 8.0 pattern set surfaced no fix-before-bump items in our codebase: enum is unused, no removed AR config keys, no routes-array usage, no SCHEMA_CACHE env var, no Benchmark.ms, Ruby 3.2.3 already meets the 3.2.0 floor. Sprockets stays — it still works at 8.0 (just no longer the new- app default). Migration to Propshaft is a separate, optional concern. The only prereq surfaced by booting the test suite under 8.0 was jbuilder still requiring active_support/proxy_object; addressed in the previous commit. Test suite is 204/204 green on 8.0.5. Deferred to the 8.0 → 8.1 hop (per skill rules — future-version runtime warnings are not fix-before-bump for the current hop): - to_time timezone behavior (config.active_support.to_time_preserves_timezone = :zone)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Okay, this isn't clear to merge yet. I'm doing this to see how the Actions run because I think there's currently a bug in it's building.