From 71da9cbc4cfe039e9f47a471e268ed6f15ed8c42 Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 1 Nov 2011 18:03:43 -0400 Subject: [PATCH] fixes #172: OR tag searching doesn't work --- app/models/tag.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/tag.rb b/app/models/tag.rb index c7a2ac906..10cb89bd9 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -191,6 +191,9 @@ class Tag < ActiveRecord::Base if tag[0] == "-" && tag.size > 1 output[:exclude] << tag[1..-1] + elsif tag[0] == "~" && tag.size > 1 + output[:include] << tag[1..-1] + elsif tag =~ /\*/ matches = Tag.name_matches(tag).all(:select => "name", :limit => 25, :order => "post_count DESC").map(&:name) matches = ["~no_matches~"] if matches.empty?