Commit dfbbc800 by ivan Lan

Add Customer Product Controller

parent 4ce841da
...@@ -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
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
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