From 5ddd8bd1f501d132c4b42e2c7e78df964a2d32ec Mon Sep 17 00:00:00 2001 From: Jonathan ES Lin Date: Tue, 13 Jan 2015 16:00:16 +0800 Subject: [PATCH] Make the hound happier --- lib/acts-as-messageable/scopes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/acts-as-messageable/scopes.rb b/lib/acts-as-messageable/scopes.rb index fba864d56..020aa321d 100644 --- a/lib/acts-as-messageable/scopes.rb +++ b/lib/acts-as-messageable/scopes.rb @@ -13,8 +13,8 @@ def initialize_scopes scope :are_from, lambda { |*args| where(:sent_messageable_id => args.first, :sent_messageable_type => args.first.class.name) } scope :are_to, lambda { |*args| where(:received_messageable_id => args.first, :received_messageable_type => args.first.class.name) } scope ActsAsMessageable.search_scope_name, - lambda { |*args| where("body like :search_txt or topic like :search_txt",:search_txt => "%#{args.first}%")} - scope :connected_with, lambda { |*args| where("(sent_messageable_type = :sent_type and + lambda { |*args| where("body like :search_txt or topic like :search_txt", :search_txt => "%#{args.first}%") } + scope :connected_with, lambda { |*args| where("(sent_messageable_type = :sent_type and sent_messageable_id = :sent_id and sender_delete = :s_delete and sender_permanent_delete = :s_perm_delete) or (received_messageable_type = :received_type and