aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/raw_email.rb10
-rw-r--r--app/views/request/show.rhtml4
2 files changed, 9 insertions, 5 deletions
diff --git a/app/models/raw_email.rb b/app/models/raw_email.rb
index 4e1a69456..1d85cc7d9 100644
--- a/app/models/raw_email.rb
+++ b/app/models/raw_email.rb
@@ -29,9 +29,13 @@ class RawEmail < ActiveRecord::Base
def directory
request_id = self.incoming_message.info_request.id.to_s
- File.join(MySociety::Config.get('RAW_EMAILS_LOCATION',
- 'files/raw_emails'),
- request_id[0..2], request_id)
+ if ENV["RAILS_ENV"] = "test"
+ return 'files/raw_email_test'
+ else
+ return File.join(MySociety::Config.get('RAW_EMAILS_LOCATION',
+ 'files/raw_emails'),
+ request_id[0..2], request_id)
+ end
end
def filepath
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 7c3f79368..1993ee6b2 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -1,4 +1,4 @@
-<% @title = h(@info_request.title) %>
+<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>
<% if @info_request.prominence == 'hidden' %>
<p id="hidden_request">
@@ -23,7 +23,7 @@
<%= render :partial => 'sidebar' %>
<div id="request_main">
- <h1><%=@title%></h1>
+ <h1><%=h(@info_request.title)%></h1>
<% if @info_request.user.profile_photo %>
<p class="user_photo_on_request">