Comments (6)
Wups, posted on the wrong issue. But you can now opt out of Turbo processing using the data-turbo=false attribute. I believe that should probably solve this? Might want to add a doc note about it.
from turbo-rails.
In case someone lands here trying to get Devise working with Turbo - there's been several workarounds/improvements suggested on Hotwire Discussion.
There's even a GoRails video with instructions.
from turbo-rails.
You can now render on POST using either 4xx or 5xx status codes. In Rails, you'd do:
respond_to do |format|
if @room.save
format.html { redirect_to @room, notice: 'Room was successfully created.' }
format.json { render :show, status: :created, location: @room }
else
format.html { render :new, status: :unprocessable_entity }
format.json { render json: @room.errors, status: :unprocessable_entity }
end
end
Part of 0.5.3.
from turbo-rails.
The responders used by Devise have been updated heartcombo/responders#223 (pending a new release). Once released, the open PR for Devise can be finalised heartcombo/devise#5340
from turbo-rails.
Would if Devise has something in place to detect all requests that come from fetch as XHR somehow, and then not do the HTML rendering if then? Maybe dive into that Devise chain and lets see if its something we have to fix there or if there's anything we can do on the turbo side.
from turbo-rails.
I remember that old turbolinks/turbolinks-classic had special code for Devise:
By default, Turbolinks includes itself in ActionController::Base. To opt out of the Turbolinks features in certain controllers (redirect_to behavior, request_method cookie, X-XHR-Referer referrer check, etc.), set config.turbolinks.auto_include to false in application.rb and include Turbolinks::Controller in the controllers where you use Turbolinks.
And Devise even has some hint here on how to use it
Also temporary stucked with Devise redirects :)
from turbo-rails.
Related Issues (20)
- Content duplication on using render in controllers HOT 1
- Chrome reloads assets in the Link preload header HOT 1
- Uglifier::Error during assets:precompile HOT 2
- Turbo not streaming changes properly / window.Turbo is undefined HOT 3
- InstaClick prefetch not working with fragment cache
- Prefetch causes turbo stream to render on hover instead of on click HOT 4
- Inverted parameters in stream responses HOT 2
- unexpected routes added as part of the turbo rails gem HOT 3
- When streaming from a worker, path helpers append a domain `https://example.com` HOT 5
- Turbo Documentation need a "Broadcast" chatper
- Refresh broadcasts generated without changes
- Incompatible with Solid_Queue HOT 1
- turbo_frame_request_id safe operator in not handled correctly HOT 2
- Shouldn't broadcast refresh if streamables == [nil] HOT 1
- @npezza93 ActiveRecord::RecordNotFound in MembersController#edit_description
- FORM with an action URL containing a query param is not submitted. HOT 1
- Mixed Content Error with Turbo Drive
- OT: Attackers might be trying to steal your information from discuss.hotwire.dev HOT 2
- Turbo refresh can hijack user navigation HOT 3
- import "@hotwired/turbo-rails" errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo-rails.