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
dfbbc800
Commit
dfbbc800
authored
Aug 29, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Customer Product Controller
parent
4ce841da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
shotengai.rb
lib/shotengai.rb
+4
-1
products_controller.rb
lib/shotengai/controllers/customer/products_controller.rb
+18
-0
No files found.
lib/shotengai.rb
View file @
dfbbc800
...
@@ -25,7 +25,10 @@ module Shotengai
...
@@ -25,7 +25,10 @@ module Shotengai
end
end
module
Customer
module
Customer
autoload
:ProductsController
,
'shotengai/controllers/customer/products_controller'
autoload
:ProductSnapshotsController
,
'shotengai/controllers/customer/product_snapshots_controller'
autoload
:ProductSeriesController
,
'shotengai/controllers/customer/product_series_controller'
autoload
:OrdersController
,
'shotengai/controllers/customer/orders_controller'
end
end
end
end
end
end
lib/shotengai/controllers/customer/products_controller.rb
0 → 100644
View file @
dfbbc800
module
Shotengai
module
Controller
module
Customer
class
ProductsController
<
Shotengai
::
Controller
::
Base
self
.
resources
=
Product
self
.
template_dir
=
'shotengai/customer/products/'
remove_actions
:create
,
:update
,
:destroy
index_query
do
|
resource
,
params
|
params
[
:catalog_list
]
?
resource
.
tagged_with
(
params
[:
catalog_list
],
on: :catalogs
)
:
resource
end
end
end
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