diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/acts_as_xapian/acts_as_xapian.rb | 2 | ||||
-rw-r--r-- | lib/attachment_to_html/adapter.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/acts_as_xapian/acts_as_xapian.rb b/lib/acts_as_xapian/acts_as_xapian.rb index 784d7ae87..7076fc586 100644 --- a/lib/acts_as_xapian/acts_as_xapian.rb +++ b/lib/acts_as_xapian/acts_as_xapian.rb @@ -844,7 +844,7 @@ module ActsAsXapian raise "Only Time or Date types supported by acts_as_xapian for :date fields, got " + value.class.to_s end elsif type == :boolean - !!value + value ? true : false else # Arrays are for terms which require multiple of them, e.g. tags if value.kind_of?(Array) 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) |