Skip to content

Commit bf46304

Browse files
dennisoelkersLennart Koopmann
authored and
Lennart Koopmann
committed
Removal of now unneeded code
Conflicts: app/controllers/messages_controller.rb
1 parent d616301 commit bf46304

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

app/controllers/messages_controller.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,13 @@ def getsimilarmessages
8989
conditions = Message.by_blacklisted_terms(Blacklist.all_terms)
9090

9191
# Add our search condition.
92-
#conditions[:message] = Hash.new if conditions[:message].blank?
93-
#conditions[:message]['$in'] = [/#{Regexp.escape(message)}/]
94-
9592
conditions = conditions.where(:message.in => [/#{Regexp.escape(message)}/])
9693

9794
# Don't search for the message we used to compare.
98-
#conditions[:id] = Hash.new
99-
#conditions[:id]['$nin'] = [message_id]
10095
conditions = conditions.where(:id.nin => [message_id])
10196

10297
# Get the messages.
10398
@messages = conditions.limit(50).order("$natural DESC")
104-
#@messages = Message.all :limit => 50, :order => "_id DESC", :conditions => conditions
10599

106100
if @messages.blank?
107101
render :text => "No similar messages found"

0 commit comments

Comments
 (0)