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

turbo streams & forms with method="get" #120

Closed
tomasc opened this issue Feb 10, 2021 · 6 comments
Closed

turbo streams & forms with method="get" #120

tomasc opened this issue Feb 10, 2021 · 6 comments

Comments

@tomasc
Copy link

tomasc commented Feb 10, 2021

I am no longer seeing the Accept header enhanced with the text/vnd.turbo-stream.html content type on get requests (using for example button_to in Rails). Is that intentional?

@seanpdoyle
Copy link
Contributor

That is intentional. For background, there are discussions in both hotwired/turbo#52 and hotwired/turbo-site#40.

@tomasc
Copy link
Author

tomasc commented Feb 10, 2021

@seanpdoyle thanks!
Would you have an advice how to implement this back in my app? I'd like to have button_to trigger get requests with Turbo Streams.

@seanpdoyle
Copy link
Contributor

There is a discussion of alternatives here: hotwired/turbo-site#40 (comment)

@tomasc
Copy link
Author

tomasc commented Feb 10, 2021

I see …

BTW just to document this in case someone else find this issue. It is almost impossible to downgrade both turbo-rails and turbo at the same time using webpack (to revert back the above mentioned changes). Since turbo-rails specifies turbo version as a minimum (ie ^7.0.0-beta.3), the latest version actually always leaks in. Just spent hours on this …

@allengreer-latero
Copy link

@tomasc If you are using yarn you can set a resolution version for a package to lock it. See docs. Not sure if you can with npm?

{
  ...
  "dependencies": {
    "@hotwired/turbo-rails": "7.0.0-beta.4",
  },
  "resolutions": {
    "@hotwired/turbo": "7.0.0-beta.3"
  }
}

@tomasc
Copy link
Author

tomasc commented Feb 11, 2021

Thanks @allengreer-latero , much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants