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 /app/controllers/request_controller.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 'app/controllers/request_controller.rb')
-rw-r--r-- | app/controllers/request_controller.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index dfc614e59..0f0a7167c 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.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: request_controller.rb,v 1.5 2007-10-16 21:17:14 louise Exp $ +# $Id: request_controller.rb,v 1.6 2007-10-24 11:39:37 francis Exp $ class RequestController < ApplicationController @@ -16,12 +16,13 @@ class RequestController < ApplicationController @info_request_pages, @info_requests = paginate :info_requests, :per_page => 25, :order => "created_at desc" end - def frontpage end # Form for creating new request def new + # Read parameters in - public body can be passed from front page + @info_request = InfoRequest.new(params[:info_request]) end # Page new form posts to @@ -41,7 +42,8 @@ class RequestController < ApplicationController elsif authenticated? @info_request.user = authenticated_user @info_request.save - flash[:notice] = "Your Freedom of Information request has been created." + @outgoing_message.send_message + flash[:notice] = "Your Freedom of Information request has been created and sent on its way." redirect_to request_url(:id => @info_request) end |