Sha256: 6a7ea41b141efcb9b41ae163414df9426e85a30925dc8fa6f239794da895d8c3

Contents?: true

Size: 278 Bytes

Versions: 1

Compression:

Stored size: 278 Bytes

Contents

module Safeconsole
  module Utils
    module_function

    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
safeconsole-1.0.0 lib/safeconsole/utils.rb