Module: Safeconsole::Utils

Defined in:
lib/safeconsole/utils.rb

Class Method Summary collapse

Class Method Details

.get_app_nameObject



5
6
7
8
9
10
# File 'lib/safeconsole/utils.rb', line 5

def get_app_name
  return Dir.pwd.split("/")[-1] unless defined?(Rails)
  return Rails.application.class.parent_name if Rails.version <= "6.0"

  Rails.application.class.module_parent_name
end