Methods
- C
- D
- E
- L
- N
- P
- S
- T
Attributes
[RW] | allow_concurrency | |
[RW] | asset_host | |
[RW] | asset_path | |
[RW] | assets | |
[RW] | cache_classes | |
[RW] | cache_store | |
[RW] | consider_all_requests_local | |
[RW] | dependency_loading | |
[RW] | exceptions_app | |
[RW] | file_watcher | |
[RW] | filter_parameters | |
[RW] | force_ssl | |
[RW] | helpers_paths | |
[RW] | logger | |
[RW] | log_tags | |
[RW] | preload_frameworks | |
[RW] | railties_order | |
[RW] | relative_url_root | |
[RW] | reload_plugins | |
[RW] | secret_token | |
[RW] | serve_static_assets | |
[RW] | ssl_options | |
[RW] | static_cache_control | |
[RW] | session_options | |
[RW] | time_zone | |
[RW] | reload_classes_only_on_change | |
[RW] | whiny_nils | |
[W] | log_level | |
[R] | encoding |
Class Public methods
# File railties/lib/rails/application/configuration.rb, line 20 20: def initialize(*) 21: super 22: self.encoding = "utf-8" 23: @allow_concurrency = false 24: @consider_all_requests_local = false 25: @filter_parameters = [] 26: @helpers_paths = [] 27: @dependency_loading = true 28: @serve_static_assets = true 29: @static_cache_control = nil 30: @force_ssl = false 31: @ssl_options = {} 32: @session_store = :cookie_store 33: @session_options = {} 34: @time_zone = "UTC" 35: @log_level = nil 36: @middleware = app_middleware 37: @generators = app_generators 38: @cache_store = [ :file_store, "#{root}/tmp/cache/" ] 39: @railties_order = [:all] 40: @relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] 41: @reload_classes_only_on_change = true 42: @file_watcher = ActiveSupport::FileUpdateChecker 43: @exceptions_app = nil 44: 45: @assets = ActiveSupport::OrderedOptions.new 46: @assets.enabled = false 47: @assets.paths = [] 48: @assets.precompile = [ Proc.new{ |path| !File.extname(path).in?(['.js', '.css']) }, 49: /(?:\/|\\|\A)application\.(css|js)$/ ] 50: @assets.prefix = "/assets" 51: @assets.version = '' 52: @assets.debug = false 53: @assets.compile = true 54: @assets.digest = false 55: @assets.manifest = nil 56: @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ] 57: @assets.js_compressor = nil 58: @assets.css_compressor = nil 59: @assets.initialize_on_precompile = true 60: @assets.logger = nil 61: end
Instance Public methods
Loads and returns the contents of the database_configuration_file. The contents of the file are processed via ERB before being sent through YAML::load.
# File railties/lib/rails/application/configuration.rb, line 67 67: def encoding=(value) 68: @encoding = value 69: if "ruby".encoding_aware? 70: silence_warnings do 71: Encoding.default_external = value 72: Encoding.default_internal = value 73: end 74: else 75: $KCODE = value 76: if $KCODE == "NONE" 77: raise "The value you specified for config.encoding is " \ 78: "invalid. The possible values are UTF8, SJIS, or EUC" 79: end 80: end 81: end
# File railties/lib/rails/application/configuration.rb, line 83 83: def paths 84: @paths ||= begin 85: paths = super 86: paths.add "config/database", :with => "config/database.yml" 87: paths.add "config/environment", :with => "config/environment.rb" 88: paths.add "lib/templates" 89: paths.add "log", :with => "log/#{Rails.env}.log" 90: paths.add "public" 91: paths.add "public/javascripts" 92: paths.add "public/stylesheets" 93: paths.add "tmp" 94: paths 95: end 96: end
# File railties/lib/rails/application/configuration.rb, line 132 132: def session_store(*args) 133: if args.empty? 134: case @session_store 135: when :disabled 136: nil 137: when :active_record_store 138: ActiveRecord::SessionStore 139: when Symbol 140: ActionDispatch::Session.const_get(@session_store.to_s.camelize) 141: else 142: @session_store 143: end 144: else 145: @session_store = args.shift 146: @session_options = args.shift || {} 147: end 148: end
Enable threaded mode. Allows concurrent requests to controller actions and multiple database connections. Also disables automatic dependency loading after boot, and disables reloading code on every request, as these are fundamentally incompatible with thread safety.