]> git.openstreetmap.org Git - rails.git/blob - config/application.rb
Merge branch 'jfire2' into routing
[rails.git] / config / application.rb
1 require File.expand_path('../boot', __FILE__)
2
3 require File.expand_path('../preinitializer', __FILE__)
4
5 if STATUS == :database_offline
6 require "action_controller/railtie"
7 require "action_mailer/railtie"
8 require "active_resource/railtie"
9 require "sprockets/railtie"
10 require "rails/test_unit/railtie"
11 else
12 require 'rails/all'
13 end
14
15 # Require the gems listed in Gemfile, including any gems
16 # you've limited to :test, :development, or :production.
17 Bundler.require(:default, Rails.env)
18
19 module OpenStreetMap
20   class Application < Rails::Application
21     # Settings in config/environments/* take precedence over those specified here.
22     # Application configuration should go into files in config/initializers
23     # -- all .rb files in that directory are automatically loaded.
24
25     # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
26     # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
27     # config.time_zone = 'Central Time (US & Canada)'
28
29     # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
30     # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
31     # config.i18n.default_locale = :de
32
33     # Custom directories with classes and modules you want to be autoloadable.
34     config.autoload_paths += %W(#{config.root}/lib)
35
36     # Configure the default encoding used in templates for Ruby 1.9.
37     config.encoding = "utf-8"
38
39     # Use SQL instead of Active Record's schema dumper when creating the database.
40     # This is necessary if your schema can't be completely dumped by the schema dumper,
41     # like if you have constraints or database-specific column types
42     unless STATUS == :database_offline
43       config.active_record.schema_format = :sql
44     end
45
46     # Enable the asset pipeline
47     config.assets.enabled = true
48
49     # Version of your assets, change this if you want to expire all your assets
50     config.assets.version = '1.0'
51
52     # Don't eager load models when the database is offline
53     if STATUS == :database_offline
54       config.paths["app/models"].skip_eager_load!
55     end
56   end
57 end