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
bb12b081
Commit
bb12b081
authored
Jul 06, 2018
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add :shotengai_series to product
parent
63ec9993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
product.rb
lib/shotengai/product.rb
+2
-1
No files found.
lib/shotengai/product.rb
View file @
bb12b081
...
...
@@ -33,6 +33,7 @@ module Shotengai
harray_accessor
:spec_template
,
:remark_template
template_with_value_getters
:spec
,
:remark
,
value_in_template:
true
has_many
:shotengai_series
,
class_name:
'Shotengai::Series'
,
foreign_key: :shotengai_product_id
belongs_to
:manager
,
polymorphic:
true
,
optional:
true
#, touch: true
default_scope
{
order
(
created_at: :desc
)
}
...
...
@@ -78,7 +79,7 @@ module Shotengai
}
def
default_series
Shotengai
::
Series
.
alive
.
find_by_id
(
default_series_id
)
||
series
.
alive
.
first
Shotengai
::
Series
.
alive
.
find_by_id
(
default_series_id
)
||
s
hotengai_s
eries
.
alive
.
first
end
def
meta
...
...
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