Sha256: bd8367f3ab618a93eda49243f55920d08154ddf943445794374070f4119ee966
Contents?: true
Size: 819 Bytes
Versions: 19
Compression:
Stored size: 819 Bytes
Contents
class ProductsController < ApplicationController before_filter :get_cart_order # GET /products # GET /products.xml def index @products = Product.published.find(:all, :order => "featured DESC, title") respond_to do |format| format.html # index.html.erb format.xml { render :xml => @products } end end # GET /products/1 # GET /products/1.xml def show @product = Product.find(params[:id]) @page_title = @product.seo_title.blank? ? @product.title : @product.seo_title respond_to do |format| format.html # show.html.erb format.xml { render :xml => @product } end end def preview flash[:notice] = "Please note that product images do not appear in previews." @product = Product.new(params[:product]) render :action => :show end end
Version data entries
19 entries across 19 versions & 1 rubygems