5: <= image_tag(product.image_url) >
6:
Casey Smith
5 posts
|
I get an error when I run http://localhost:3000/login/login I get this error message=
Showing login/index.html.erb where line #3 raised: You have a nil object when you didn’t expect it! Extracted source (around line #3): 1: Your Pragmatic Catalog2: 3: <% for product in @products -> 4: 5: <= image_tag(product.image_url) > 6: <= h(product.title) %> |
Sam Ruby
109 posts
|
Um, you are ahead of me. Check the preface to the third edition for what chapters are ready. Either that, or look for the visual clues in the form of the colors of the top and bottom borders on each page. |
Casey Smith
5 posts
|
Thanks Sam I will check that. Is there a place just to get problems answers that I come across? |
Sam Ruby
109 posts
|
I’ll try to explore further tomorrow, but to get past that specific problem, modify app/controllers/login_controller.rb thus: def index @products = Product.find(:all) @total_orders = Order.count end |
Sam Ruby
109 posts
|
This will be corrected in the next beta, but click on the following for the correct version of app/views/login/index.rhtml Sorry for the inconvenience. |
5 posts, 2 voices