diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/environment.rb | 3 | ||||
-rw-r--r-- | config/general-example | 6 | ||||
-rw-r--r-- | config/routes.rb | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/config/environment.rb b/config/environment.rb index 548db1b72..ad696e2b9 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -82,4 +82,7 @@ ActionView::Helpers::TagHelper.module_eval do end end +# Domain for URLs (so can work for scripts, not just web pages) +ActionController::UrlWriter.default_url_options[:host] = MySociety::Config.get("DOMAIN", 'localhost:3000') + diff --git a/config/general-example b/config/general-example index 6b860cd8d..a37ba53f7 100644 --- a/config/general-example +++ b/config/general-example @@ -19,12 +19,12 @@ * Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. * Email: francis@mysociety.org; WWW: http://www.mysociety.org * - * $Id: general-example,v 1.4 2007-11-13 12:02:16 francis Exp $ + * $Id: general-example,v 1.5 2007-11-23 12:01:20 francis Exp $ * */ -// URL for use in emails etc. -define('OPTION_BASE_URL', 'http://127.0.0.1:3000'); +// Domain used in URLs generated by scripts (e.g. for going in some emails) +define('OPTION_DOMAIN', '127.0.0.1:3000'); // Incoming email define('OPTION_INCOMING_EMAIL_DOMAIN', 'localhost'); // e.g. 'foifa.com' diff --git a/config/routes.rb b/config/routes.rb index 04c56a818..467f21358 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: routes.rb,v 1.22 2007-11-22 15:22:36 francis Exp $ +# $Id: routes.rb,v 1.23 2007-11-23 12:01:20 francis Exp $ ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. @@ -19,7 +19,7 @@ ActionController::Routing::Routes.draw do |map| request.new_request '/new', :action => 'new' request.create_request '/create', :action => 'create' request.show_request '/request/:id', :action => 'show' - request.classify_request '/classify/:outgoing_message_id', :action => 'classify' + request.classify_request '/classify/:incoming_message_id', :action => 'classify' end map.with_options :controller => 'user' do |user| |