Slide 13
Slide 13 text
class Product < AR::Base
scope :sellable, -> { where.not(status: :絶版) }
end
class ProductsController < AppC
def index
@products = Product.sellable.order(nantoka)
end
end
class Backroom::ProductsController < AppC
def index
@products = Product.order(kantoka)
end
end