Commit 6ed8272b by liyijie

Fix catalog order by created_at; Add catlog info to product index API

parent 8b684408
json.extract! product, :id, :title, :status, :status_zh,
:need_express, :cover_image
json.catalog_list product.catalog_list if product.respond_to?(:catalog_list)
json.default_series product.default_series, partial: 'shotengai/share/series_simple', as: :series
......@@ -144,7 +144,7 @@ module Shotengai
}
define_method(list_name) {
catalog_class.where(id: super().map { |tag| Shotengai::Catalog.parse_tag(tag) }).order(:nested_level)
catalog_class.unscope(:order).where(id: super().map { |tag| Shotengai::Catalog.parse_tag(tag) }).order(:nested_level)
}
end
end
......
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