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
8eab964e
Commit
8eab964e
authored
Sep 22, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix query_spec_with_product of Series
parent
5a2e875a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
product_series_spec.rb
...s/templates/spec/requests/merchant/product_series_spec.rb
+4
-4
series.rb
lib/shotengai/series.rb
+1
-1
No files found.
lib/generators/templates/spec/requests/merchant/product_series_spec.rb
View file @
8eab964e
...
@@ -69,8 +69,8 @@ RSpec.describe "#{namespace}/products/:product_id/product_series", type: :reques
...
@@ -69,8 +69,8 @@ RSpec.describe "#{namespace}/products/:product_id/product_series", type: :reques
spec:
{
spec:
{
type: :object
,
type: :object
,
properties:
{
properties:
{
color:
{
type: :
array
},
color:
{
type: :
string
},
size:
{
type: :
array
},
size:
{
type: :
string
},
},
},
},
},
meta:
{
meta:
{
...
@@ -143,8 +143,8 @@ RSpec.describe "#{namespace}/products/:product_id/product_series", type: :reques
...
@@ -143,8 +143,8 @@ RSpec.describe "#{namespace}/products/:product_id/product_series", type: :reques
spec:
{
spec:
{
type: :object
,
type: :object
,
properties:
{
properties:
{
color:
{
type: :
array
},
color:
{
type: :
string
},
size:
{
type: :
array
},
size:
{
type: :
string
},
},
},
},
},
meta:
{
meta:
{
...
...
lib/shotengai/series.rb
View file @
8eab964e
...
@@ -35,7 +35,7 @@ module Shotengai
...
@@ -35,7 +35,7 @@ module Shotengai
if
val
.
keys
.
sort
==
product
.
spec
.
keys
.
sort
if
val
.
keys
.
sort
==
product
.
spec
.
keys
.
sort
keys
=
[];
values
=
[]
keys
=
[];
values
=
[]
val
.
map
{
|
k
,
v
|
keys
<<
"spec->'$.
\"
#{
k
}
\"
' = ? "
;
values
<<
v
}
val
.
map
{
|
k
,
v
|
keys
<<
"spec->'$.
\"
#{
k
}
\"
' = ? "
;
values
<<
v
}
where
(
keys
.
join
(
' and '
),
*
values
)
where
(
product:
product
).
where
(
keys
.
join
(
' and '
),
*
values
)
else
else
self
.
none
self
.
none
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