diff options
author | francis <francis> | 2007-10-24 11:39:37 +0000 |
---|---|---|
committer | francis <francis> | 2007-10-24 11:39:37 +0000 |
commit | bc3b0c2e181697f240d3f8c863c4cdb03d4ca88d (patch) | |
tree | 2ab885540aa8a6586848f16ad719aa396d8146c4 /config/environment.rb | |
parent | 8277d14fc923089bef47ac92520fabec3dea64b7 (diff) |
Read in mySociety style configuration file, if it is there (use sensible defaults if not).
Actually send request to public body, or fake address on staging site.
Fix minor bug with sending front page form public body to new request page.
Diffstat (limited to 'config/environment.rb')
-rw-r--r-- | config/environment.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config/environment.rb b/config/environment.rb index 2e3fc4db2..2b3211690 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -10,6 +10,11 @@ RAILS_GEM_VERSION = '1.2.1' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') +# MySociety specific helper functions +$:.push("../rblib") +load "validate.rb" +load "config.rb" + Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here @@ -42,6 +47,10 @@ Rails::Initializer.run do |config| config.active_record.default_timezone = :utc # See Rails::Configuration for more options + + # Load intial mySociety config + MySociety::Config.set_file(File.join(config.root_path, 'config', 'general'), true) + MySociety::Config.load_default end # Add new inflection rules using the following format @@ -62,10 +71,6 @@ ActiveRecord::Errors.default_error_messages[:blank] = "must be filled in" # Include your application configuration below -# Include our own helper functions -$:.push("../rblib") -load "validate.rb" - # Output HTML 4.0 compliant code, using method described in this ticket # http://dev.rubyonrails.org/ticket/6009 ActionView::Helpers::TagHelper.module_eval do @@ -74,3 +79,4 @@ ActionView::Helpers::TagHelper.module_eval do end end + |