Class: Rails::Application::Configuration
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Rails::Engine::Configuration
|
Defined in: | railties/lib/rails/application/configuration.rb |
Class Method Summary
- .new ⇒ Configuration constructor
::Rails::Engine::Configuration - Inherited
::Rails::Railtie::Configuration - Inherited
Instance Attribute Summary
- #allow_concurrency rw
- #asset_host rw
- #assets rw
- #autoflush_log rw
- #beginning_of_week rw
- #cache_classes rw
- #cache_store rw
- #colorize_logging rw
- #colorize_logging=(val) rw
- #consider_all_requests_local rw
- #console rw
- #eager_load rw
- #encoding rw
- #encoding=(value) rw
- #exceptions_app rw
- #file_watcher rw
- #filter_parameters rw
- #filter_redirect rw
- #force_ssl rw
- #helpers_paths rw
- #log_formatter rw
- #log_level rw
- #log_level=(level) rw
- #log_tags rw
- #logger rw
- #railties_order rw
- #relative_url_root rw
- #reload_classes_only_on_change rw
- #secret_key_base rw
- #secret_token rw
- #serve_static_assets rw
- #serve_static_assets=(value) rw
- #serve_static_files rw
- #session_options rw
- #ssl_options rw
- #static_cache_control rw
- #time_zone rw
- #x rw
::Rails::Engine::Configuration - Inherited
#autoload_once_paths, #autoload_once_paths=, #autoload_paths, #autoload_paths=, #eager_load_paths, #eager_load_paths=, | |
#middleware | Returns the middleware stack for the engine. |
#middleware=, #root, #root= |
Instance Method Summary
- #annotations
-
#database_configuration
Loads and returns the entire raw configuration of database from values stored in
config/database.yml
. - #paths
- #session_store(*args)
::Rails::Engine::Configuration - Inherited
#generators | Holds generators configuration: |
#paths |
::Rails::Railtie::Configuration - Inherited
#after_initialize | Last configurable block to run. |
#app_generators | This allows you to modify application's generators from Railties. |
#app_middleware | This allows you to modify the application's middlewares from Engines. |
#before_configuration | First configurable block to run. |
#before_eager_load | Third configurable block to run. |
#before_initialize | Second configurable block to run. |
#eager_load_namespaces | All namespaces that are eager loaded. |
#respond_to?, | |
#to_prepare | Defines generic callbacks to run before |
#to_prepare_blocks | ::Array of callbacks defined by |
#watchable_dirs | Add directories that should be watched for change. |
#watchable_files | Add files that should be watched for change. |
Constructor Details
.new ⇒ Configuration
# File 'railties/lib/rails/application/configuration.rb', line 22
def initialize(*) super self.encoding = "utf-8" @allow_concurrency = nil @consider_all_requests_local = false @filter_parameters = [] @filter_redirect = [] @helpers_paths = [] @serve_static_files = true @static_cache_control = nil @force_ssl = false @ssl_options = {} @session_store = : @session_options = {} @time_zone = "UTC" @beginning_of_week = :monday @has_explicit_log_level = false @log_level = nil @middleware = app_middleware @generators = app_generators @cache_store = [ :file_store, "#{root}/tmp/cache/" ] @railties_order = [:all] @relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] @reload_classes_only_on_change = true @file_watcher = ActiveSupport::FileUpdateChecker @exceptions_app = nil @autoflush_log = true @log_formatter = ActiveSupport::Logger::SimpleFormatter.new @eager_load = nil @secret_token = nil @secret_key_base = nil @x = Custom.new @assets = ActiveSupport::OrderedOptions.new @assets.enabled = true @assets.paths = [] @assets.precompile = [ Proc.new { |path, fn| fn =~ /app\/assets/ && !%w(.js .css).include?(File.extname(path)) }, /(?:\/|\\|\A)application\.(css|js)$/ ] @assets.prefix = "/assets" @assets.version = '1.0' @assets.debug = false @assets.compile = true @assets.digest = false @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/#{Rails.env}/" ] @assets.js_compressor = nil @assets.css_compressor = nil @assets.logger = nil end
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rails::Railtie::Configuration
Instance Attribute Details
#allow_concurrency (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#asset_host (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#assets (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#autoflush_log (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#beginning_of_week (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#cache_classes (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#cache_store (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#colorize_logging (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 135
def colorize_logging ActiveSupport::LogSubscriber.colorize_logging end
#colorize_logging=(val) (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 139
def colorize_logging=(val) ActiveSupport::LogSubscriber.colorize_logging = val self.generators.colorize_logging = val end
#consider_all_requests_local (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#console (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#eager_load (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#encoding (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 20
attr_reader :encoding
#encoding=(value) (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 71
def encoding=(value) @encoding = value silence_warnings do Encoding.default_external = value Encoding.default_internal = value end end
#exceptions_app (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#file_watcher (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#filter_parameters (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#filter_redirect (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#force_ssl (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#helpers_paths (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#log_formatter (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#log_level (rw)
[ GitHub ]#log_level=(level) (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 126
def log_level=(level) @has_explicit_log_level = !!(level) @log_level = level end
#log_tags (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#logger (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#railties_order (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#relative_url_root (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#reload_classes_only_on_change (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#secret_key_base (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#secret_token (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#serve_static_assets (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 153
def serve_static_assets ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE serve_static_files end
#serve_static_assets=(value) (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 158
def serve_static_assets=(value) ActiveSupport::Deprecation.warn SERVE_STATIC_ASSETS_DEPRECATION_MESSAGE self.serve_static_files = value end
#serve_static_files (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#session_options (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#ssl_options (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#static_cache_control (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#time_zone (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
#x (rw)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 11
attr_accessor :allow_concurrency, :asset_host, :assets, :autoflush_log, :cache_classes, :cache_store, :consider_all_requests_local, :console, :eager_load, :exceptions_app, :file_watcher, :filter_parameters, :force_ssl, :helpers_paths, :logger, :log_formatter, :, :railties_order, :relative_url_root, :secret_key_base, :secret_token, :serve_static_files, :, :static_cache_control, :, :time_zone, :reload_classes_only_on_change, :beginning_of_week, :filter_redirect, :x
Instance Method Details
#annotations
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 186
def annotations SourceAnnotationExtractor::Annotation end
#database_configuration
Loads and returns the entire raw configuration of database from values stored in config/database.yml
.
# File 'railties/lib/rails/application/configuration.rb', line 97
def database_configuration path = paths["config/database"].existent.first yaml = Pathname.new(path) if path config = if yaml && yaml.exist? require "yaml" require "erb" YAML.load(ERB.new(yaml.read).result) || {} elsif ENV['DATABASE_URL'] # Value from ENV['DATABASE_URL'] is set to default database connection # by Active Record. {} else raise "Could not load database configuration. No such file - #{paths["config/database"].instance_variable_get(:@paths)}" end config rescue Psych::SyntaxError => e raise "YAML syntax error occurred while parsing #{paths["config/database"].first}. " \ "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \ "Error: #{e.}" rescue => e raise e, "Cannot load `Rails.application.database_configuration`:\n#{e.}", e.backtrace end
#paths
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 79
def paths @paths ||= begin paths = super paths.add "config/database", with: "config/database.yml" paths.add "config/secrets", with: "config/secrets.yml" paths.add "config/environment", with: "config/environment.rb" paths.add "lib/templates" paths.add "log", with: "log/#{Rails.env}.log" paths.add "public" paths.add "public/javascripts" paths.add "public/stylesheets" paths.add "tmp" paths end end
#session_store(*args)
[ GitHub ]# File 'railties/lib/rails/application/configuration.rb', line 163
def session_store(*args) if args.empty? case @session_store when :disabled nil when :active_record_store begin ActionDispatch::Session::ActiveRecordStore rescue NameError raise "`ActiveRecord::SessionStore` is extracted out of Rails into a gem. " \ "Please add `activerecord-session_store` to your Gemfile to use it." end when Symbol ActionDispatch::Session.const_get(@session_store.to_s.camelize) else @session_store end else @session_store = args.shift @session_options = args.shift || {} end end