Merge pull request #4534 from BrokenEagle/fix-4533

Fix the tag matches option
This commit is contained in:
evazion
2020-06-23 03:00:32 -05:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ class PostVersion < ApplicationRecord
end
def tag_matches(string)
tag = string.split(/\S+/)[0]
tag = string.match(/\S+/)[0]
return all if tag.nil?
tag = "*#{tag}*" unless tag =~ /\*/
where_ilike(:tags, tag)