From 5abd4a8fd64c5074323ecd25752b4cf27d566fa2 Mon Sep 17 00:00:00 2001 From: francis Date: Wed, 3 Oct 2007 17:13:50 +0000 Subject: Login stuff with POST redirect not working yet --- app/controllers/file_request_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/controllers/file_request_controller.rb') diff --git a/app/controllers/file_request_controller.rb b/app/controllers/file_request_controller.rb index 2b62cb796..bfb2c27be 100644 --- a/app/controllers/file_request_controller.rb +++ b/app/controllers/file_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: file_request_controller.rb,v 1.10 2007-09-17 10:13:45 francis Exp $ +# $Id: file_request_controller.rb,v 1.11 2007-10-03 17:13:50 francis Exp $ class FileRequestController < ApplicationController def index @@ -22,8 +22,10 @@ class FileRequestController < ApplicationController @outgoing_message.info_request = @info_request # This automatically saves dependent objects, such as @info_request, in the same transaction - if not @info_request.save + if not @info_request.valid? render :action => 'index' + elsif check_authentication + @info_request.save end # Save both models -- cgit v1.2.3