Merge pull request #2734 from evazion/fix-negated-aliases
Resolve aliases when removing negated tags (fix #2730)
This commit is contained in:
@@ -615,6 +615,7 @@ class Post < ActiveRecord::Base
|
||||
def remove_negated_tags(tags)
|
||||
negated_tags, tags = tags.partition {|x| x =~ /\A-/i}
|
||||
negated_tags = negated_tags.map {|x| x[1..-1]}
|
||||
negated_tags = TagAlias.to_aliased(negated_tags)
|
||||
return tags - negated_tags
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user