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
3f38ba59
Commit
3f38ba59
authored
Oct 17, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delegate detail_info_value to series if a snapshot is unpaid
parent
0f93acca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
snapshot.rb
lib/shotengai/snapshot.rb
+10
-3
No files found.
lib/shotengai/snapshot.rb
View file @
3f38ba59
...
...
@@ -79,12 +79,19 @@ module Shotengai
# 支付前 信息 delegate to series
%i{
original_price price spec_value banners
cover_image detail title
title cover_image banners detail
original_price price
spec_value
}
.
each
do
|
column
|
define_method
(
column
)
{
super
()
||
self
.
series
.
send
(
column
)
}
end
# 重写 JsonColumn 中 column_has_implants 所生成的 detail_info_value 方法,
# 将未支付时的 detail_info_value 指派给 series.detail_info_template
def
detail_info_value
full_info_value
[
'detail'
]
||
series
.
detail_info_template
.
decode
end
def
already_disable
series
.
deleted?
||
product
.
on_sale?
.!
end
...
...
@@ -115,7 +122,7 @@ module Shotengai
product_meta:
product
.
meta
,
series_meta:
series
.
meta
,
meta:
meta
,
detail_info_value:
series
.
detail_info_template
,
detail_info_value:
series
.
detail_info_template
.
decode
,
info_value:
info_value
,
)
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