add postarchive model, fixes #2831: Replace Subscriptions Link With Search:All Link

This commit is contained in:
Albert Yi
2017-01-11 11:32:29 -08:00
parent f1ffd6d9c9
commit 0ab45ebc42
8 changed files with 63 additions and 2 deletions

View File

@@ -173,6 +173,10 @@ module PostSets
tag_subscription.present?
end
def is_saved_search?
tag_string =~ /search:/
end
def tag_subscription
@tag_subscription ||= tag_array.select {|x| x =~ /^sub:/}.map {|x| x.sub(/^sub:/, "")}.first
end