Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. ActionView::Template::Error (undefined method `fetch_value' for nil:NilClass):
  2. 21: .line_items
  3. 22: =f.simple_fields_for :line_items do |line_item|
  4. 23: =render 'line_item_fields', :f => line_item
  5. 24: //error line// =link_to_add_association "add line", f, :line_items
  6.  
  7. //Rfq controller
  8. def rfq_params
  9. params.require(:rfq).permit(
  10. :quote_number,:rep_id, :owner, :customer_id, :customer_name, :end_user_list, :application_list, :due, :ship_date, :is_budgetary, :notes, :mandatory_due_date,
  11. valves_attributes: [:id, :_destroy, :productline, :discwedge, :valvetype, :valveends, :valvematerial, :valveconfig, :valvenotes,
  12. line_items_attributes: [
  13. :tag, :qty, :size, :class, :operator, :trim, :_destroy
  14. ]
  15. ])
  16. end
  17.  
  18.  
  19. //form partial:
  20.  
  21. .valves
  22. =f.fields_for :valves do |valve|
  23. =render 'valve_fields', :f => valve
  24. =link_to_add_association 'add valve', f, :valves, "data-association-insertion-traversal" => "next"
  25.  
  26. //valve partial
  27. .line_items
  28. =f.simple_fields_for :line_items do |line_item|
  29. =render 'line_item_fields', :f => line_item
  30. =link_to_add_association "add line", f, :line_items
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement