Commit c501f2db by ivan Lan

Fix controller generator about cart controller

parent 3bc5c157
...@@ -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
......
class <%= @controller_prefix %><%= @klass_name.pluralize %>Controller < Shotengai::Controller::<%= "#{@role}/#{@key}".camelize %>Controller class <%= @controller_prefix %><%= @key.classify.pluralize %>Controller < Shotengai::Controller::<%= "#{@role}/#{@key}".camelize %>Controller
self.resources = <%= @klass_name %> self.resources = <%= @klass_name %>
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment