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
c501f2db
Commit
c501f2db
authored
Sep 12, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix controller generator about cart controller
parent
3bc5c157
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
controllers_generator.rb
lib/generators/shotengai/controllers_generator.rb
+1
-1
template_controller.rb
lib/generators/templates/controllers/template_controller.rb
+1
-1
No files found.
lib/generators/shotengai/controllers_generator.rb
View file @
c501f2db
...
@@ -49,7 +49,7 @@ module Shotengai
...
@@ -49,7 +49,7 @@ module Shotengai
'orders'
=>
@order
,
'orders'
=>
@order
,
'product_series'
=>
"
#{
@product
}
Series"
,
'product_series'
=>
"
#{
@product
}
Series"
,
'product_snapshots'
=>
"
#{
@product
}
Snapshot"
,
'product_snapshots'
=>
"
#{
@product
}
Snapshot"
,
'carts'
=>
'Order::Cart'
,
'carts'
=>
'
::
Order::Cart'
,
}.
each
do
|
key
,
klass_name
|
}.
each
do
|
key
,
klass_name
|
@key
,
@klass_name
=
key
,
klass_name
@key
,
@klass_name
=
key
,
klass_name
...
...
lib/generators/templates/controllers/template_controller.rb
View file @
c501f2db
class
<
%= @controller_prefix %><%=
@k
lass_name
.
pluralize
%>Controller < Shotengai::Controller::<%= "#{@role}/#{@key}".camelize %>
Controller
class
<
%= @controller_prefix %><%=
@k
ey
.
classify
.
pluralize
%>Controller < Shotengai::Controller::<%= "#{@role}/#{@key}".camelize %>
Controller
self
.
resources
=
<
%= @klass_name %>
self
.
resources
=
<
%= @klass_name %>
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