]> git.openstreetmap.org Git - rails.git/blob - config/application.rb
Precompile stylesheet for OpenLayers
[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 if defined?(Bundler)
16   # If you precompile assets before deploying to production, use this line
17   Bundler.require *Rails.groups(:assets => %w(development test))
18   # If you want your assets lazily compiled in production, use this line
19   # Bundler.require(:default, :assets, Rails.env)
20 end
21
22 module OpenStreetMap
23   class Application < Rails::Application
24     # Settings in config/environments/* take precedence over those specified here.
25     # Application configuration should go into files in config/initializers
26     # -- all .rb files in that directory are automatically loaded.
27
28     # Custom directories with classes and modules you want to be autoloadable.
29     config.autoload_paths += %W(#{config.root}/lib)
30
31     # Only load the plugins named here, in the order given (default is alphabetical).
32     # :all can be used as a placeholder for all plugins not explicitly named.
33     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
34
35     # Activate observers that should always be running.
36     unless STATUS == :database_offline
37       config.active_record.observers = :spam_observer
38     end
39
40     # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
41     # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
42     # config.time_zone = 'Central Time (US & Canada)'
43
44     # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
45     # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
46     # config.i18n.default_locale = :de
47
48     # Configure the default encoding used in templates for Ruby 1.9.
49     config.encoding = "utf-8"
50
51     # Configure sensitive parameters which will be filtered from the log file.
52     config.filter_parameters += [:password, :pass_crypt, :pass_crypt_confirmation]
53
54     # Enable the asset pipeline
55     config.assets.enabled = true
56
57     # Version of your assets, change this if you want to expire all your assets
58     config.assets.version = '1.0'
59
60     # Use SQL instead of Active Record's schema dumper when creating the test database.
61     # This is necessary if your schema can't be completely dumped by the schema dumper,
62     # like if you have constraints or database-specific column types
63     unless STATUS == :database_offline
64       config.active_record.schema_format = :sql
65     end
66   end
67 end