Module: Authenticate::Debug

Extended by:
ActiveSupport::Concern
Included in:
Controller, Lifecycle, Session
Defined in:
lib/authenticate/debug.rb

Overview

Simple debug output for gem.

Instance Method Summary collapse

Instance Method Details

#debug(msg) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/authenticate/debug.rb', line 8

def debug(msg)
  if defined?(Rails) && defined?(Rails.logger) && Authenticate.configuration.debug
    Rails.logger.info msg.to_s
  elsif Authenticate.configuration.debug
    puts msg.to_s
  end
end