I am following the text" agile web development with rails"here is my code,
class InteractController < ApplicationController def index �...@products = Product.find_products_for_sale end def add_to_cart product = Product.find(params[:id])�...@cart = find_cart �[email protected]_product(product) rescue ActiveRecord::RecordNotFound logger.error("Attempt to access invalid product #{params[:id]}") flash[:notice] = "Invalid product" redirect_to :action => 'index'end def empty_cart session[:cart] = nil flash[:notice] = " Now,your cart is currently empty" redirect_to :action => 'index'end private def redirect_to_index(msg) flash[:notice] = msg redirect_to :action => 'index' end end Regards and Respects, Kindness in thought leads to wisdom. Kindness in speech leads to eloquence. Kindness in action leads to love. --- On Tue, 12/15/09, tom <[email protected]> wrote: From: tom <[email protected]> Subject: Re: [Rails] Need help...NameError in InteractController#add_to_cart To: [email protected] Date: Tuesday, December 15, 2009, 2:47 PM - which tutorial are u following? - can u show ur cart-model? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

