Adds fuzzy string matching and prefix matching

This commit is contained in:
Albert Yi
2018-08-24 12:04:49 -07:00
parent 68c30961ac
commit 66e413b540
6 changed files with 245 additions and 37 deletions

View File

@@ -100,11 +100,11 @@ class TagImplicationTest < ActiveSupport::TestCase
end
should "update its descendants on save" do
ti1 = FactoryBot.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb")
ti2 = FactoryBot.create(:tag_implication, :antecedent_name => "ccc", :consequent_name => "ddd")
ti1 = FactoryBot.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb", :status => "active")
ti2 = FactoryBot.create(:tag_implication, :antecedent_name => "ccc", :consequent_name => "ddd", :status => "active")
ti1.reload
ti2.reload
ti2.update_attributes(
ti2.update(
:antecedent_name => "bbb"
)
ti1.reload