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
78978de5
Commit
78978de5
authored
Sep 24, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add catalog tree & Fix series controller
parent
95b0dcd0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
catalog.rb
lib/shotengai/catalog.rb
+13
-0
product_series_controller.rb
...otengai/controllers/merchant/product_series_controller.rb
+2
-0
No files found.
lib/shotengai/catalog.rb
View file @
78978de5
...
...
@@ -43,6 +43,10 @@ module Shotengai
raise
Shotengai
::
WebError
.
new
(
'Illegality catalge name chain'
,
'-1'
,
'400'
)
end
def
tree
where
(
super_catalog_id:
nil
).
map
(
&
:tree
)
end
# def input_from_file
# end
end
...
...
@@ -64,5 +68,14 @@ module Shotengai
def
brothers
super_catalog
.
sub_catalogs
end
def
tree
{
name:
name
,
iamge:
iamge
,
level_type:
level_type
,
sub_catalogs:
sub_catalogs
.
map
(
&
:tree
)
}
end
end
end
lib/shotengai/controllers/merchant/product_series_controller.rb
View file @
78978de5
...
...
@@ -6,6 +6,8 @@ module Shotengai
self
.
template_dir
=
'shotengai/merchant/series/'
before_action
:manager_auth
skip_before_action
:set_resource
,
only: :batch_event
# add_actions :batch_event
def
default_query
resources
...
...
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