aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/file_request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2007-10-08 14:58:27 +0000
committerfrancis <francis>2007-10-08 14:58:27 +0000
commit1a642c05e0c65316f161e63d8413f204a59b9c60 (patch)
treec5da2dfdd79537d8aa0e2aa188bb76e5e7a2de77 /app/controllers/file_request_controller.rb
parent4f97763246a5689d65365d2165c51a52437a699d (diff)
Rename file_request_controller to new_controller, so consistent with URL
Diffstat (limited to 'app/controllers/file_request_controller.rb')
-rw-r--r--app/controllers/file_request_controller.rb46
1 files changed, 0 insertions, 46 deletions
diff --git a/app/controllers/file_request_controller.rb b/app/controllers/file_request_controller.rb
deleted file mode 100644
index bfb2c27be..000000000
--- a/app/controllers/file_request_controller.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# app/controllers/file_request_controller.rb:
-# Interface for building a new FOI request.
-#
-# 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.11 2007-10-03 17:13:50 francis Exp $
-
-class FileRequestController < ApplicationController
- def index
- # render index.rhtml template
- end
-
- def create
- # Create both FOI request and the first request message
- @info_request = InfoRequest.new(params[:info_request])
- @outgoing_message = OutgoingMessage.new(params[:outgoing_message].merge({
- :status => 'ready',
- :message_type => 'initial_request'
- }))
- @info_request.outgoing_messages << @outgoing_message
- @outgoing_message.info_request = @info_request
-
- # This automatically saves dependent objects, such as @info_request, in the same transaction
- if not @info_request.valid?
- render :action => 'index'
- elsif check_authentication
- @info_request.save
- 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
-# @info_request.save!
-# @outgoing_message.save!
-# end
-# else
-# render :action => 'index'
-# end
- end
-
-end
-
-