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

Doesn't play nicely with rack-mini-profiler #20

Open
JacobEvelyn opened this issue Dec 1, 2015 · 0 comments
Open

Doesn't play nicely with rack-mini-profiler #20

JacobEvelyn opened this issue Dec 1, 2015 · 0 comments

Comments

@JacobEvelyn
Copy link

rack-mini-profiler needs to be added at a specific point in relation to this middleware (it injects HTML into the view). Unfortunately, because of the way this gem adds middleware after all other middleware has been added (:after => :load_config_initializers), rack-mini-profiler can't insert itself correctly via an initializer as is the standard practice.

Is there a reason this gem can't use the same pattern? In production (at least in Rails), app.config.middleware invokes a wrapper object around the actual middleware object, storing commands for manipulating the order of the middleware and invoking them all once the actual classes are loaded. That seems like it would allow this gem to use the same pattern, but I confess I don't know a ton about middleware and was planning on digging in more deeply tomorrow.

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

1 participant