Ask A Question

Notifications

You’re not receiving notifications from this thread.

form using form_with not loading

Fugee Ohu asked in Rails

127.0.0.1 - - [30/Nov/2019:19:55:21 EST] "GET /items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=9&commit=New+item HTTP/1.1" 200 1758
http://localhost:3000/items -> /items/new?utf8=%E2%9C%93&item%5Bitem_type_id%5D=9&commit=New+item

<%= form_with(model: @item, url: new_item_path(@item), method: "get") do |f| %>

 <div class="field">
     <%= f.select :item_type_id, nested_set_options(ItemType.all, @item_type) {|i| "#{'-' * i.level} #{i.name}" }, {:include_blank => "Select"}%>
 </div>

<div class="actions">
    <%= f.submit "New item" %>
</div>

<% end %>

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 73,723+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.