Commit 3a79b749 by ivan Lan

Add carts_controller to controller generator

parent 970bb3d2
example_id | status | run_time |
------------------------------------------ | ------- | --------------- |
./spec/shotengai/models_spec.rb[1:1:1:1] | passed | 0.58762 seconds |
./spec/shotengai/models_spec.rb[1:1:1:2] | passed | 0.3368 seconds |
./spec/shotengai/models_spec.rb[1:1:2:1] | failed | 0.68851 seconds |
./spec/shotengai/models_spec.rb[1:1:2:2] | passed | 0.70395 seconds |
./spec/shotengai/models_spec.rb[1:1:2:3] | passed | 0.6569 seconds |
./spec/shotengai/models_spec.rb[1:1:2:4] | unknown | |
./spec/shotengai/models_spec.rb[1:1:3:1] | passed | 0.32973 seconds |
./spec/shotengai/models_spec.rb[1:1:3:2] | passed | 0.33056 seconds |
./spec/shotengai/models_spec.rb[1:1:3:3] | passed | 0.33828 seconds |
./spec/shotengai/models_spec.rb[1:1:4:1] | passed | 0.35822 seconds |
./spec/shotengai/models_spec.rb[1:1:5:1] | passed | 0.33872 seconds |
./spec/shotengai/models_spec.rb[1:1:5:2:1] | passed | 0.36586 seconds |
./spec/shotengai/models_spec.rb[1:1:5:2:2] | passed | 0.36069 seconds |
./spec/shotengai/models_spec.rb[1:2:1:1] | passed | 0.34614 seconds |
./spec/shotengai/models_spec.rb[1:2:1:2] | passed | 0.3256 seconds |
./spec/shotengai/models_spec.rb[1:2:2:1] | passed | 0.62601 seconds |
./spec/shotengai/models_spec.rb[1:2:2:2] | passed | 0.45201 seconds |
./spec/shotengai/models_spec.rb[1:3:1] | passed | 0.48308 seconds |
example_id | status | run_time |
------------------------------------------ | ------ | --------------- |
./spec/shotengai/models_spec.rb[1:1:1:1] | passed | 0.76841 seconds |
./spec/shotengai/models_spec.rb[1:1:1:2] | passed | 0.39895 seconds |
./spec/shotengai/models_spec.rb[1:1:2:1] | passed | 0.40877 seconds |
./spec/shotengai/models_spec.rb[1:1:2:2] | passed | 0.40292 seconds |
./spec/shotengai/models_spec.rb[1:1:2:3] | passed | 0.40936 seconds |
./spec/shotengai/models_spec.rb[1:1:2:4] | passed | 0.39549 seconds |
./spec/shotengai/models_spec.rb[1:1:3:1] | passed | 0.36859 seconds |
./spec/shotengai/models_spec.rb[1:1:3:2] | passed | 0.3979 seconds |
./spec/shotengai/models_spec.rb[1:1:3:3] | passed | 0.40805 seconds |
./spec/shotengai/models_spec.rb[1:1:4:1] | failed | 0.66932 seconds |
./spec/shotengai/models_spec.rb[1:1:5:1] | passed | 0.38994 seconds |
./spec/shotengai/models_spec.rb[1:1:5:2:1] | passed | 0.48448 seconds |
./spec/shotengai/models_spec.rb[1:1:5:2:2] | failed | 0.56715 seconds |
./spec/shotengai/models_spec.rb[1:2:1:1] | passed | 0.40297 seconds |
./spec/shotengai/models_spec.rb[1:2:1:2] | passed | 0.3698 seconds |
./spec/shotengai/models_spec.rb[1:2:2:1] | passed | 0.66138 seconds |
./spec/shotengai/models_spec.rb[1:2:2:2] | passed | 0.48194 seconds |
./spec/shotengai/models_spec.rb[1:3:1] | passed | 0.37498 seconds |
......@@ -49,11 +49,12 @@ module Shotengai
'orders' => @order,
'product_series' => "#{@product}Series",
'product_snapshots' => "#{@product}Snapshot",
'carts' => '::Order::Cart',
}.each do |key, klass_name|
@key, @klass_name = key, klass_name
template "template_controller.rb",
"app/controllers/#{@namespace}/#{@klass_name.underscore.pluralize}_controller.rb"
"app/controllers/#{@namespace}/#{@key}_controller.rb"
end
create_routes
create_factory
......
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