Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(RoutingConstraints): Allow Turbo Stream requests #2913

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jun 4, 2024

What is this pull request for?

rails-turbo registers a new request format

text/vnd.turbo-stream.html

which is used whenever Turbo redirects.

In order to handle those requests from - for example the messages controller - we need to allow this mime type to route into Alchemy as well.

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

`rails-turbo` [registers a new request format](https://github.com/hotwired/turbo-rails/blob/e376852bfb273f69f4ebb54cf516b99fcbaa7acb/lib/turbo/engine.rb#L82-L89)

    text/vnd.turbo-stream.html

which is used whenever Turbo redirects.

In order to handle those requests from - for example the messages controller -
we need to allow this mime type to route into Alchemy as well.
@tvdeyen tvdeyen added bug backport-to-7.0-stable Needs to be backported to 7.0-stable backport-to-7.1-stable Needs to be backported to 7.1-stable backport-to-7.2-stable Needs to be backported to 7.2-stable labels Jun 4, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner June 4, 2024 13:15
@tvdeyen tvdeyen enabled auto-merge June 4, 2024 13:19
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.97%. Comparing base (294faa5) to head (772a151).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2913   +/-   ##
=======================================
  Coverage   95.97%   95.97%           
=======================================
  Files         232      232           
  Lines        6279     6279           
=======================================
  Hits         6026     6026           
  Misses        253      253           

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

@tvdeyen tvdeyen merged commit 0e8d250 into AlchemyCMS:main Jun 4, 2024
39 checks passed
@tvdeyen tvdeyen deleted the allow-turbo-stream-requests branch June 4, 2024 13:21
@alchemycms-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
7.0-stable
7.1-stable
7.2-stable

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-7.0-stable Needs to be backported to 7.0-stable backport-to-7.1-stable Needs to be backported to 7.1-stable backport-to-7.2-stable Needs to be backported to 7.2-stable bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants