-
Notifications
You must be signed in to change notification settings - Fork 220
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
Automatically wire up middleware for rails apps #27
Comments
Is this comment on the right issue? Because I fixed a bug with On Fri, Apr 13, 2012 at 12:19 AM, Sam
|
oops, should not have asked that getting a sane name seems to be quite challenging seems to get us a bit of info ... but it is not enough |
oops apologies ... yeah my mistake my patch was not needed, though we still need to figure out a way of getting nice names for the partials etc |
k ... I think I got it working now for views ... still need to wire up rack middleware |
Okay, this is working now in my Rails project automatically. It defaults to off unless the environment is development. I have added a configuration method so you can configure it in rails with an initializer since you don't have access to the constructor. Here's an example from my project, where I want it visible in development and production: # config/initializers/mini_profiler.rb
Rack::MiniProfiler.configuration[:authorize_cb] = lambda {|env| true } |
When the gem is included in the Gemfile it should automatically wire up middleware so people don't need to muck with config, it should set it up so MP is enabled in debug but totally dormant in prd (unless a hook it added)
The text was updated successfully, but these errors were encountered: