Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def help
- Helper.instance
- end
- class Helper
- include Singleton
- include ActionView::Helpers::UrlHelper
- end
- def add
- @product = Product.find(params[:id])
- @item = @cart.add(params[:id])
- flash[:cart_notice] = "Added <em> #{@item.product.name}</em> to your #{help.link_to "Shopping Cart", :controller => "cart"}"
- redirect_to :controller => "products"
- end
- #############
- You have a nil object when you didn't expect it!
- The error occurred while evaluating nil.url_for
Add Comment
Please, Sign In to add comment