Commit a00700d7 by ivan Lan

Fix catalog_list_filter

parent 4bfe8877
...@@ -118,7 +118,7 @@ module Shotengai ...@@ -118,7 +118,7 @@ module Shotengai
# } # }
scope "#{list_name}_filter".to_sym, ->(catalogs) { scope "#{list_name}_filter".to_sym, ->(catalogs) {
tags = catalogs && catalogs.try(:tag) || catalogs&.map(&:tag) tags = catalogs && catalogs.try(:tag) || catalogs.any? && catalogs&.map(&:tag)
tags ? tagged_with(tags, on: list_name) : all tags ? tagged_with(tags, on: list_name) : all
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment