1 # Be sure to restart your server when you modify this file
3 # Uncomment below to force Rails into production mode when
4 # you don't control web/app server and can't set it the proper way
5 # ENV['RAILS_ENV'] ||= 'production'
7 # Specifies gem version of Rails to use when vendor/rails is not present
8 require File.join(File.dirname(__FILE__), 'boot')
12 MerbRadiant::Initializer.run do |config|
13 # Settings in config/environments/* take precedence over those specified here.
14 # Application configuration should go into files in config/initializers
15 # -- all .rb files in that directory are automatically loaded.
16 # See Rails::Configuration for more options.
18 # Skip frameworks you're not going to use (only works if using vendor/rails).
19 # To use Rails without a database, you must remove the Active Record framework
20 config.frameworks -= [ :action_web_service, :action_mailer ]
22 # Only load the plugins named here, in the order given. By default, all plugins
23 # in vendor/plugins are loaded in alphabetical order.
24 # :all can be used as a placeholder for all plugins not explicitly named
25 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
27 # Only load the extensions named here, in the order given. By default all extensions in vendor/extensions are
28 # loaded, in alphabetical order. :all can be used as a placeholder for all extensions not explicitly named.
29 # config.extensions = [ :all ]
31 # Force all environments to use the same logger level
32 # (by default production uses :info, the others :debug)
33 # config.log_level = :debug
35 # Your secret key for verifying cookie session data integrity.
36 # If you change this key, all old sessions will become invalid!
37 # Make sure the secret is at least 30 characters and all random,
38 # no regular words or you'll be exposed to dictionary attacks.
39 config.action_controller.session = {
40 :session_key => '_radiant_session',
41 :secret => 'asdfqwerfxcoivswqenadfasdfqewpfioutyqwel'
44 # Use the database for sessions instead of the cookie-based default,
45 # which shouldn't be used to store highly confidential information
46 # (create the session table with 'rake db:sessions:create')
47 config.action_controller.session_store = :active_record_store
49 # Use SQL instead of Active Record's schema dumper when creating the test database.
50 # This is necessary if your schema can't be completely dumped by the schema dumper,
51 # like if you have constraints or database-specific column types
52 # config.active_record.schema_format = :sql
54 # Enable page/fragment caching by setting a file-based store
55 # (remember to create the caching directory and make it readable to the application)
56 # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/fragment_cache"
57 config.action_controller.page_cache_directory = "#{Merb.root}/cache"
59 # Activate observers that should always be running
60 config.active_record.observers = :user_action_observer
62 # Make Active Record use UTC-base instead of local time
63 config.active_record.default_timezone = :utc
65 # Set the default field error proc
66 config.action_view.field_error_proc = Proc.new do |html, instance|
67 %{<div class="error-with-field">#{html} <small class="error">• #{[instance.error_message].flatten.first}</small></div>}
71 # Add new inflection rules using the following format:
72 Inflector.inflections do |inflect|
73 inflect.uncountable 'config'
74 inflect.uncountable 'meta'
77 # Auto-require text filters
78 Dir["#{MERB_RADIANT_ROOT}/app/models/*_filter.rb"].each do |filter|
79 require_dependency File.basename(filter).sub(/\.rb$/, '')
82 # Response Caching Defaults
83 ResponseCache.defaults[:directory] = ActionController::Base.page_cache_directory
84 ResponseCache.defaults[:logger] = ActionController::Base.logger