Guest User

Untitled

a guest
Jun 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. In config/routes.rb:
  2.  
  3. map.resources :offerings, :has_many => [:allocations]
  4.  
  5. map.resources :allocations
  6.  
  7. In AllocationsController:
  8. def new
  9. @allocation = Allocation.new
  10. @offering = Offering.find_by_id(params[:offering_id])
  11. end
  12.  
  13. Gets this error:
  14.  
  15. Showing app/views/allocations/_allocation_form.html.erb where line #18 raised:
  16.  
  17. undefined method `allocation_offering_path' for #<ActionView::Base:0x102ecb780>
  18.  
  19. Extracted source (around line #18):
  20.  
  21. 15: $('input[name=new_underwriter]').live('change', maintain_sub_underwriter_list);
  22. 16: });
  23. 17: </script>
  24. 18: <% form_for([@allocation, @offering]) do |f| %>
  25. 19: <%= f.error_messages %>
  26. 20:
  27. 21: <div id="main_wizard_div">
Add Comment
Please, Sign In to add comment