Guest User

Untitled

a guest
Apr 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def help
  2. Helper.instance
  3. end
  4.  
  5. class Helper
  6. include Singleton
  7. include ActionView::Helpers::UrlHelper
  8. end
  9.  
  10. def add
  11. @product = Product.find(params[:id])
  12. @item = @cart.add(params[:id])
  13. flash[:cart_notice] = "Added <em> #{@item.product.name}</em> to your #{help.link_to "Shopping Cart", :controller => "cart"}"
  14. redirect_to :controller => "products"
  15. end
  16.  
  17. #############
  18.  
  19. You have a nil object when you didn't expect it!
  20. The error occurred while evaluating nil.url_for
Add Comment
Please, Sign In to add comment