aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application.rb23
-rw-r--r--app/controllers/file_request_controller.rb25
-rw-r--r--app/controllers/frontpage_controller.rb4
3 files changed, 40 insertions, 12 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 4365de88d..ddd6e86b4 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -6,21 +6,16 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: application.rb,v 1.3 2007-08-01 17:06:04 francis Exp $
+# $Id: application.rb,v 1.4 2007-08-04 11:10:25 francis Exp $
class ApplicationController < ActionController::Base
+ # Standard hearders, footers and navigation for whole site
+ layout "default"
+
# Pick a unique cookie name to distinguish our session data from others'
session :session_key => '_foi_session_id'
- def check_authentication
- unless session[:user]
- session[:intended_action] = action_name
- session[:intended_controller] = controller_name
- redirect_to :action => "signin"
- end
- end
-
def signin
if request.post?
user = User.authenticate(params[:email], params[:password])
@@ -39,4 +34,14 @@ class ApplicationController < ActionController::Base
redirect_to frontpage
end
+ private
+
+ def check_authentication
+ unless session[:user]
+ session[:intended_action] = action_name
+ session[:intended_controller] = controller_name
+ redirect_to :action => "signin"
+ end
+ end
+
end
diff --git a/app/controllers/file_request_controller.rb b/app/controllers/file_request_controller.rb
new file mode 100644
index 000000000..9b0f7c403
--- /dev/null
+++ b/app/controllers/file_request_controller.rb
@@ -0,0 +1,25 @@
+# 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.1 2007-08-04 11:10:25 francis Exp $
+
+class FileRequestController < ApplicationController
+ def index
+ respond_to do |format|
+ format.html
+ end
+ end
+
+ def create
+ respond_to do |format|
+ format.html
+ end
+ end
+
+
+end
+
+
diff --git a/app/controllers/frontpage_controller.rb b/app/controllers/frontpage_controller.rb
index 16aaaf4c3..36d31d2f5 100644
--- a/app/controllers/frontpage_controller.rb
+++ b/app/controllers/frontpage_controller.rb
@@ -4,11 +4,9 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: frontpage_controller.rb,v 1.3 2007-08-03 16:14:58 francis Exp $
+# $Id: frontpage_controller.rb,v 1.4 2007-08-04 11:10:25 francis Exp $
class FrontpageController < ApplicationController
- layout "default"
-
def index
respond_to do |format|
format.html