module RailsMiniProfiler

Main namespace for Rails Mini Profiler

Constants

VERSION

Public Class Methods

authorize!(current_user) click to toggle source

Authorize the current user for this request

@param current_user [Object] the current user

@see User#current_user

# File lib/rails_mini_profiler.rb, line 66
def authorize!(current_user)
  RailsMiniProfiler::User.current_user = current_user
end
configuration() click to toggle source

Create a new configuration object

@return [Configuration] a new configuration

# File lib/rails_mini_profiler.rb, line 31
def configuration
  @configuration ||= Configuration.new
end
configure() { |configuration| ... } click to toggle source

Configure Rails Mini Profiler

You may use this to configure where and how Rails Mini Profiler stores profiling and storage information.

@see github.com/hschne/rails-mini-profiler#configuration

@yieldreturn [Configuration] a new configuration

# File lib/rails_mini_profiler.rb, line 42
def configure
  yield(configuration)
end
current_user=(current_user) click to toggle source

Set the current user for this request

@param current_user [Object] the current user

@see User#current_user

# File lib/rails_mini_profiler.rb, line 75
def current_user=(current_user)
  RailsMiniProfiler::User.current_user = current_user
end
logger() click to toggle source

Access the current logger

@return [Logger] the logger instance

# File lib/rails_mini_profiler.rb, line 57
def logger
  @logger ||= configuration.logger
end
storage_configuration() click to toggle source

Access storage configuration.

@return [Storage] a new storage configuration

# File lib/rails_mini_profiler.rb, line 50
def storage_configuration
  configuration.storage
end