tag subscriptions: fix broken saved search migrations.

This commit is contained in:
evazion
2017-04-21 22:42:09 -05:00
parent 9718c6e107
commit 0b2493b2dd
4 changed files with 25 additions and 7 deletions

View File

@@ -112,6 +112,11 @@ class SavedSearch < ActiveRecord::Base
end
def label_string=(val)
self.labels = val.to_s.scan(/\S+/).map {|x| SavedSearch.normalize_label(x)}
self.labels = val.to_s.split(/[[:space:]]+/)
end
def labels=(labels)
labels = labels.map { |label| SavedSearch.normalize_label(label) }
super(labels)
end
end