wow, this has been broken for OH so long, we need to segragate users correctly so MP results work as expected

This commit is contained in:
Sam 2013-03-24 19:52:03 -07:00
parent 6804c994f5
commit 67c438434b
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ if defined?(Rack::MiniProfiler)
(env['PATH_INFO'] !~ /commits-widget/) (env['PATH_INFO'] !~ /commits-widget/)
end end
Rack::MiniProfiler.config.user_provider = lambda do |env|
user = CurrentUser.lookup_from_env(env)
user ? user.id.to_s : Rack::Request.new(env).ip
end
Rack::MiniProfiler.config.position = 'left' Rack::MiniProfiler.config.position = 'left'
Rack::MiniProfiler.config.backtrace_ignores ||= [] Rack::MiniProfiler.config.backtrace_ignores ||= []
Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/ Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/