aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/new_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/new_controller.rb')
-rw-r--r--app/controllers/new_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/new_controller.rb b/app/controllers/new_controller.rb
index 84fb0fb81..1da6f1398 100644
--- a/app/controllers/new_controller.rb
+++ b/app/controllers/new_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: new_controller.rb,v 1.3 2007-10-09 17:29:43 francis Exp $
+# $Id: new_controller.rb,v 1.4 2007-10-10 16:06:17 francis Exp $
class NewController < ApplicationController
def index
@@ -24,16 +24,18 @@ class NewController < ApplicationController
# This automatically saves dependent objects, such as @info_request, in the same transaction
if not @info_request.valid?
render :action => 'index'
- elsif check_authentication
+ elsif authenticated?
@info_request.user = authenticated_user
@info_request.save
+ flash[:notice] = "Your Freedom of Information request has been created."
+ redirect_to :controller => 'request', :id => @info_request
end
# Save both models
# valid = @info_request.valid?
# valid &&= @outgoing_message.valid? # XXX maybe there is a nicer way of preventing lazy boolean evaluation than this
# if valid
-# if check_authentication
+# if authenticated?
# @info_request.save!
# @outgoing_message.save!
# end