Module: Appsignal::Utils::RailsHelper Private

Defined in:
lib/appsignal/utils/rails_helper.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.application_config_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



15
16
17
# File 'lib/appsignal/utils/rails_helper.rb', line 15

def self.application_config_path
  File.expand_path(File.join(Dir.pwd, "config/application.rb"))
end

.detected_rails_app_nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
9
10
11
12
13
# File 'lib/appsignal/utils/rails_helper.rb', line 6

def self.detected_rails_app_name
  rails_class = Rails.application.class
  if rails_class.respond_to? :module_parent_name # Rails 6
    rails_class.module_parent_name
  else # Older Rails versions
    rails_class.parent_name
  end
end

.environment_config_pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



19
20
21
# File 'lib/appsignal/utils/rails_helper.rb', line 19

def self.environment_config_path
  File.expand_path(File.join(Dir.pwd, "config/environment.rb"))
end