aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-05-28 09:44:20 +0100
committerGareth Rees <gareth@mysociety.org>2015-05-28 09:44:20 +0100
commit47c4c79948bb2fc35e24a898fda7fb636fda655d (patch)
tree7d7add385b0e0b8b4f1ac9be843a397b3022e28c /lib
parentc6e8e298fd0861cd822f23f370a01ccbc21cb9d3 (diff)
parentd8da040dce219f66e7788bddf645ce9c9aa017f4 (diff)
Merge remote-tracking branch 'jpmckinney/truefalse' into rails-3-develop
Diffstat (limited to 'lib')
-rw-r--r--lib/acts_as_xapian/tasks/xapian.rake2
-rw-r--r--lib/attachment_to_html/adapter.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/acts_as_xapian/tasks/xapian.rake b/lib/acts_as_xapian/tasks/xapian.rake
index c1986ce1e..52d94011a 100644
--- a/lib/acts_as_xapian/tasks/xapian.rake
+++ b/lib/acts_as_xapian/tasks/xapian.rake
@@ -9,7 +9,7 @@ namespace :xapian do
# "verbose=true" to print model name as it is run.
desc 'Updates Xapian search index with changes to models since last call'
task :update_index => :environment do
- ActsAsXapian.update_index(ENV['flush'] ? true : false, ENV['verbose'] ? true : false)
+ ActsAsXapian.update_index(ENV['flush'], ENV['verbose'])
end
# Parameters - specify 'models="PublicBody User"' to say which models
diff --git a/lib/attachment_to_html/adapter.rb b/lib/attachment_to_html/adapter.rb
index d8b9f41f7..058fb2a01 100644
--- a/lib/attachment_to_html/adapter.rb
+++ b/lib/attachment_to_html/adapter.rb
@@ -41,7 +41,7 @@ module AttachmentToHTML
end
def contains_images?
- !!body.match(/<img[^>]*>/mi)
+ body.match(/<img[^>]*>/mi)
end
def create_tempfile(text)