aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/general_controller.rb12
-rw-r--r--doc/THEMES.md2
-rw-r--r--spec/models/outgoing_mailer_spec.rb8
3 files changed, 15 insertions, 7 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index d28f4deec..c715b547d 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -32,12 +32,12 @@ class GeneralController < ApplicationController
if body_short_names.empty?
# This is too slow
@popular_bodies = PublicBody.find(:all,
- :select => "public_bodies.*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c",
- :order => "c desc",
- :limit => 32,
- :conditions => conditions,
- :joins => :translations
- )
+ :select => "public_bodies.*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c",
+ :order => "c desc",
+ :limit => 32,
+ :conditions => conditions,
+ :joins => :translations
+ )
else
conditions[0] += " and public_bodies.url_name in (" + body_short_names + ")"
@popular_bodies = PublicBody.find(:all,
diff --git a/doc/THEMES.md b/doc/THEMES.md
index c2381b61f..a7dd2d31f 100644
--- a/doc/THEMES.md
+++ b/doc/THEMES.md
@@ -53,7 +53,7 @@ place of the core "about us" file.
Rails expects all its stylesheets to live at `<railshome>/public`,
which presents a problem for plugins. Here's how we solve it: the
stylesheet and associated resources for your theme live (by
-convention) in at `alavatelitheme/public/`. This is symlinked from
+convention) in at `alavetelitheme/public/`. This is symlinked from
the main Rails app -- see `alavetelitheme/install.rb` to see how this
happens.
diff --git a/spec/models/outgoing_mailer_spec.rb b/spec/models/outgoing_mailer_spec.rb
index 75c8053b4..c5fde93fc 100644
--- a/spec/models/outgoing_mailer_spec.rb
+++ b/spec/models/outgoing_mailer_spec.rb
@@ -24,6 +24,7 @@ describe OutgoingMailer, " when working out follow up addresses" do
im = ir.incoming_messages[0]
im.raw_email.data = im.raw_email.data.sub("\"FOI Person\" <foiperson@localhost>", "foiperson@localhost")
+ im.parse_raw_email! true
# check the basic entry in the fixture is fine
OutgoingMailer.name_and_email_for_followup(ir, im).should == "foiperson@localhost"
@@ -36,6 +37,7 @@ describe OutgoingMailer, " when working out follow up addresses" do
im = ir.incoming_messages[0]
im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI [ Person")
+ im.parse_raw_email! true
# check the basic entry in the fixture is fine
OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI [ Person\" <foiperson@localhost>"
@@ -48,6 +50,7 @@ describe OutgoingMailer, " when working out follow up addresses" do
im = ir.incoming_messages[0]
im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI \\\" Person")
+ im.parse_raw_email! true
# check the basic entry in the fixture is fine
OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI \\\" Person\" <foiperson@localhost>"
@@ -60,6 +63,7 @@ describe OutgoingMailer, " when working out follow up addresses" do
im = ir.incoming_messages[0]
im.raw_email.data = im.raw_email.data.sub("FOI Person", "FOI @ Person")
+ im.parse_raw_email! true
# check the basic entry in the fixture is fine
OutgoingMailer.name_and_email_for_followup(ir, im).should == "\"FOI @ Person\" <foiperson@localhost>"
@@ -116,6 +120,8 @@ describe OutgoingMailer, "when working out follow up subjects" do
om.incoming_message_followup = im
im.raw_email.data = im.raw_email.data.sub("Subject: Geraldine FOI Code AZXB421", "Subject: re: Geraldine FOI Code AZXB421")
+ im.parse_raw_email! true
+
OutgoingMailer.subject_for_followup(ir, om).should == "re: Geraldine FOI Code AZXB421"
end
@@ -127,6 +133,8 @@ describe OutgoingMailer, "when working out follow up subjects" do
im.raw_email.data = im.raw_email.data.sub("foiperson@localhost", "postmaster@localhost")
im.raw_email.data = im.raw_email.data.sub("Subject: Geraldine FOI Code AZXB421", "Subject: Delivery Failed")
+ im.parse_raw_email! true
+
OutgoingMailer.subject_for_followup(ir, om).should == "Re: Freedom of Information request - Why do you have & such a fancy dog?"
end
end