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
db2d7671
Commit
db2d7671
authored
Aug 28, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish Merchant Series Controller
parent
e6c21f24
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
index.json.jbuilder
...ators/templates/views/merchant/series/index.json.jbuilder
+1
-1
_series.json.jbuilder
lib/generators/templates/views/share/_series.json.jbuilder
+3
-3
_series_simple.json.jbuilder
...rators/templates/views/share/_series_simple.json.jbuilder
+3
-3
_snapshot_simple.json.jbuilder
...tors/templates/views/share/_snapshot_simple.json.jbuilder
+2
-0
product_series_controller.rb
...otengai/controllers/merchant/product_series_controller.rb
+1
-1
No files found.
lib/generators/templates/views/merchant/series/index.json.jbuilder
View file @
db2d7671
json.current_page @resources.current_page
json.total_pages @resources.total_pages
json.set! @resources.klass.model_name.collection do
json.array! @resources, partial: 'shotengai/share/
product_simple', as: :product
s
json.array! @resources, partial: 'shotengai/share/
series_simple', as: :serie
s
end
lib/generators/templates/views/share/_series.json.jbuilder
View file @
db2d7671
json.extract! series, :id, :original_price, :price,
:stock, :spec, :meta
\ No newline at end of file
json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :cover_image, :banners, :meta, :detail, :shotengai_product_id
\ No newline at end of file
lib/generators/templates/views/share/_series_simple.json.jbuilder
View file @
db2d7671
json.extract! series, :id, :original_price, :price,
:stock, :spec, :meta
\ No newline at end of file
json.extract! series, :id, :title, :original_price, :price,
:stock, :spec, :cover_image, :meta, :shotengai_product_id
\ No newline at end of file
lib/generators/templates/views/share/_snapshot_simple.json.jbuilder
View file @
db2d7671
json.extract! snapshot, :id, :original_price, :price, :count,
:total_price, :total_original_price, :revised_amount
:spec, :cover_image, :meta
\ No newline at end of file
lib/shotengai/controllers/merchant/product_series_controller.rb
View file @
db2d7671
...
...
@@ -6,7 +6,7 @@ module Shotengai
self
.
template_dir
=
'shotengai/merchant/series/'
default_query
do
|
klass
,
params
|
klass
.
where
(
shotengai_product_id:
params
)
klass
.
where
(
shotengai_product_id:
params
[
:product_id
]
)
end
private
...
...
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