aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application.rb6
-rw-r--r--app/controllers/request_controller.rb8
2 files changed, 9 insertions, 5 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index e86fe7338..0241ec66e 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: application.rb,v 1.15 2007-10-16 21:17:14 louise Exp $
+# $Id: application.rb,v 1.16 2007-10-24 11:39:37 francis Exp $
class ApplicationController < ActionController::Base
@@ -138,5 +138,7 @@ class ApplicationController < ActionController::Base
return request.env["REMOTE_USER"]
end
end
-
end
+
+
+
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