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

Any advice on how to use this with Rails? #6

Closed
ghiculescu opened this issue Jul 2, 2018 · 1 comment
Closed

Any advice on how to use this with Rails? #6

ghiculescu opened this issue Jul 2, 2018 · 1 comment

Comments

@ghiculescu
Copy link

rack/rack#1149 (comment) hinted at the fact that Rails doesn't use Rack::Builder.

I've tried the steps in the readme, and am still able to run middleware that mutates state on each request.

Just wondering if you have any advice on how to run this (or something similar) on a Rails 4 (or 5 if that's easier, we are about to upgrade) app?

@ioquatix
Copy link
Owner

Hey, sorry I never replied.

Well, I don't know how rails works. But my guess is, if you try to apply this gem, it will break.

Rails almost certainly has some kind of middleware stack.

https://github.com/rails/rails/blob/1518ce3dc8dc092a32cf1020ff7c67f2337b3993/actionpack/lib/action_dispatch/middleware/executor.rb

But they'd need to adopt a similar policy of frozen controllers, views, etc. Unfortunately, this is way out of the scope of this gem.

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

No branches or pull requests

2 participants