Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
shotengai
Commits
6ed8272b
Commit
6ed8272b
authored
Oct 06, 2017
by
liyijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix catalog order by created_at; Add catlog info to product index API
parent
8b684408
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
_product_simple.json.jbuilder
...ators/templates/views/share/_product_simple.json.jbuilder
+2
-2
product.rb
lib/shotengai/product.rb
+1
-1
No files found.
lib/generators/templates/views/share/_product_simple.json.jbuilder
View file @
6ed8272b
json.extract! product, :id, :title, :status, :status_zh,
json.extract! product, :id, :title, :status, :status_zh,
:need_express, :cover_image
:need_express, :cover_image
json.default_series product.default_series, partial: 'shotengai/share/series_simple', as: :series
json.catalog_list product.catalog_list if product.respond_to?(:catalog_list)
\ No newline at end of file
json.default_series product.default_series, partial: 'shotengai/share/series_simple', as: :series
lib/shotengai/product.rb
View file @
6ed8272b
...
@@ -144,7 +144,7 @@ module Shotengai
...
@@ -144,7 +144,7 @@ module Shotengai
}
}
define_method
(
list_name
)
{
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
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment