Skip to content

Commit

Permalink
Make the hound happier
Browse files Browse the repository at this point in the history
  • Loading branch information
ernsheong committed Jan 13, 2015
1 parent e80e914 commit 5ddd8bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/acts-as-messageable/scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ddd8bd

Please sign in to comment.