Thanks in advance
I want to know how to solve No method errors
Agile Rails 4th ed
Great book
But second time I get this type of error
I would like to know how to troubleshoot and resolve
Please see below thanks once again
NoMethodError in Store#index
Showing C:/rails/shop9/app/views/line_items/_line_item.html.erb where
line #9 raised:
undefined method `title’ for nil:NilClass
Extracted source (around line #9):
6: <% end %>
8:
9:
10:
number_to_currency(line_item.total_price) %>
11:
Trace of template inclusion: app/views/carts/_cart.html.erb,
app/views/layouts/application.html.erb
Rails.root: C:/rails/shop9
Application Trace | Framework Trace | Full Trace
app/views/line_items/_line_item.html.erb:9:in
_app_views_line_items__line_item_html_erb__441883346_13180080__860564653' app/views/carts/_cart.html.erb:3:in
_app_views_carts__cart_html_erb___244752806_13248624_537741326’
app/views/layouts/application.html.erb:37:in block in _app_views_layouts_application_html_erb___681624400_16614672_759801029' app/helpers/application_helper.rb:6:in
hidden_div_if’
app/views/layouts/application.html.erb:36:in
`_app_views_layouts_application_html_erb___681624400_16614672_759801029’