hi, ive got a wierd problem that i think is perhaps a stupid mistake on my part, but i cant figure out what it is.
NoMethodError in Carts#show
Showing /home/hrzn/Documents/Ruby/work/depot/app/views/carts/show.html.erb where line #18 raised:
undefined method `total_price’ for #
Extracted source (around line #18):
15: 16: <tr class="total_line"> 17: <td colspan="2">Total</td> 18: <%= number_to_currency(@cart.total_price) %></td> 19: </tr> 20: 21: </table>
i did look at it self to see if there are anything i forgot, but it looks excactly like the online source code.
please any help woud be much appreciated
if i remove line 18 then everything work again, but it just cant seem to find the definition of the method.