Class: NimbleshopSimply::ProductsController

Inherits:
SimplyController
  • Object
show all
Defined in:
app/controllers/nimbleshop_simply/products_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
14
# File 'app/controllers/nimbleshop_simply/products_controller.rb', line 8

def index
  @products             = Product.active.order(:created_at)
  @link_groups          = LinkGroup.all
  @product_groups       = ProductGroup.all

  respond_with @products
end

#showObject



16
17
18
19
20
21
22
# File 'app/controllers/nimbleshop_simply/products_controller.rb', line 16

def show
  @product        = Product.find_by_permalink!(params[:id])
  @page_title     = @product.name
  @product_groups = ProductGroup.all

  respond_with @product
end