Skip to content

Allow Rails 8.1#3456

Merged
mamhoff merged 6 commits intomainfrom
rails-8.1
Jan 22, 2026
Merged

Allow Rails 8.1#3456
mamhoff merged 6 commits intomainfrom
rails-8.1

Conversation

@tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Nov 2, 2025

What is this pull request for?

Allows the latest version of Rails (8.1). Some changes has to be made to how searchable attributes are build
for ransack search, because sqlite has a different column order on linux then on macos.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@tvdeyen tvdeyen requested a review from a team as a code owner November 2, 2025 17:08
@tvdeyen tvdeyen added this to the 8.1 milestone Nov 2, 2025
@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.43%. Comparing base (6620bf4) to head (47c61a2).
⚠️ Report is 25 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3456   +/-   ##
=======================================
  Coverage   97.42%   97.43%           
=======================================
  Files         314      314           
  Lines        8170     8172    +2     
=======================================
+ Hits         7960     7962    +2     
  Misses        210      210           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen force-pushed the rails-8.1 branch 2 times, most recently from 9241cdd to 65feb78 Compare November 7, 2025 22:48
@tvdeyen tvdeyen force-pushed the rails-8.1 branch 2 times, most recently from 112029d to 638ed3d Compare December 30, 2025 19:24
@tvdeyen tvdeyen marked this pull request as draft January 21, 2026 10:36
@tvdeyen tvdeyen force-pushed the rails-8.1 branch 4 times, most recently from cac3893 to 2e50fbe Compare January 22, 2026 13:58
`namespace` is broken with a options hash and creates
double nested `admin/admin` routes and `scope` emits
an deprecation warning.
Rails 8.1 changed how attribute getters get defined
and this broke the hint getter method from the Alchemy::Hints
module. Simply moving it below the attribute definition
fixed the issue.
…havior

Since Rails 8.1 the SQLite Adapter returns database columns
in different order on different platforms (macOS vs Linux).
This caused the generated Ransack search field name to differ
between local development and CI, leading to parameter
filtering mismatches where permitted params on the server
didn't match the field names sent by the client.

By sorting searchable_attribute_names, the generated search_field_name
is now deterministic regardless of the underlying database column order.

Signed-off-by: Thomas von Deyen <vondeyen@blish.cloud>
…compatibility

Ransack requires ransackable_associations to be defined on ActiveStorage::Blob
when the association-traversing attribute appears first in a compound search
predicate. With sorted searchable attribute names, the field name changed from
name_or_image_file_blob_filename_cont to image_file_blob_filename_or_name_cont,
which triggers this Ransack validation.
@tvdeyen tvdeyen marked this pull request as ready for review January 22, 2026 14:59
@mamhoff mamhoff merged commit a7de6d6 into main Jan 22, 2026
22 checks passed
@mamhoff mamhoff deleted the rails-8.1 branch January 22, 2026 15:46
@tvdeyen tvdeyen added dependencies Pull requests that update a dependency file enhancement New feature or enhancement labels Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants