Guest User

Untitled

a guest
Jun 24th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. ## Part of the form
  2. <%= f.select (:shipping, [
  3. ['FedEx Home Delivery (3 business days) - $0', '0'],
  4. ['FedEx Overnight Shipping - $15.00', '15.00'],
  5. ]
  6. ) %>
  7. </div>
  8.  
  9. <div class="bg">
  10. <div class="total"><strong>Order Total: $<%= @order_total_six + @shipping %></strong></div>
  11.  
  12. ## Error I am getting
  13. can't convert nil into String
  14.  
  15. TypeError in Public#order_page
  16.  
  17. Showing app/views/public/order_page.html.erb where line #52 raised:
  18.  
  19. can't convert nil into String
  20.  
  21. Extracted source (around line #52):
  22.  
  23. 49: </div>
  24. 50:
  25. 51: <div class="bg">
  26. 52: <div class="total"><strong>Order Total: $<%= @order_total_six + @shipping %></strong></div>
  27. 53: </div>
  28. 54: </div>
  29. 55: </div>
  30.  
  31.  
  32. ## Notes:
  33. I am trying to add the value from the shipping together. The problem might be I am trying
  34. to add the symbol (:shipping) with the instance variable I defined in my controller.
  35. I thought :symboles turned into instance variables in the view.
Add Comment
Please, Sign In to add comment