aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames McKinney <james@slashpoundbang.com>2015-05-27 16:34:52 -0400
committerJames McKinney <james@slashpoundbang.com>2015-05-27 16:34:52 -0400
commitd8da040dce219f66e7788bddf645ce9c9aa017f4 (patch)
tree63eb5e04e629a268edff6df4397abe8d95b7c666
parentef97ebe2b9b12f5c44a9382b7a81cfca765c1696 (diff)
Eliminate !! (bang bang)
-rw-r--r--app/controllers/user_controller.rb2
-rw-r--r--lib/acts_as_xapian/acts_as_xapian.rb2
-rw-r--r--lib/attachment_to_html/adapter.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index e23649a1f..8d9adfc77 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -188,7 +188,7 @@ class UserController < ApplicationController
if @user_signin.email_confirmed
session[:user_id] = @user_signin.id
session[:user_circumstance] = nil
- session[:remember_me] = !!params[:remember_me]
+ session[:remember_me] = params[:remember_me] ? true : false
if is_modal_dialog
render :action => 'signin_successful'
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)