provide debug method
This commit is contained in:
parent
3a6c22fbd9
commit
df94d40b73
@ -93,6 +93,12 @@ module Additionals
|
||||
false
|
||||
end
|
||||
|
||||
def debug(message)
|
||||
return if Rails.env.production?
|
||||
|
||||
Rails.logger.debug "#{Time.current.strftime('%H:%M:%S')} DEBUG [#{caller_locations(1..1).first.label}]: #{message}"
|
||||
end
|
||||
|
||||
def class_prefix(klass)
|
||||
klass_name = klass.is_a?(String) ? klass : klass.name
|
||||
klass_name.underscore.tr '/', '_'
|
||||
|
Loading…
Reference in New Issue
Block a user