favgroups: convert post_ids from string to array.

This commit is contained in:
evazion
2020-01-14 23:33:55 -06:00
parent eecd9a183d
commit ab325c5d2b
25 changed files with 141 additions and 288 deletions

View File

@@ -34,15 +34,6 @@ class Pool < ApplicationRecord
where("pools.category = ?", "collection")
end
def series_first
order(Arel.sql("(case pools.category when 'series' then 0 else 1 end), pools.name"))
end
def selected_first(current_pool_id)
return all if current_pool_id.blank?
reorder(Arel.sql("(case pools.id when #{current_pool_id.to_i} then 0 else 1 end), pools.name"))
end
def name_matches(name)
name = normalize_name_for_search(name)
name = "*#{name}*" unless name =~ /\*/