Ruby on Rails Sunday, December 1, 2019

When I click submit nothing happens The console only shows the request

items/index.html.erb:

<%= 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 %>

new.html.erb:

<%= render form %>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/53e9cef1-537b-4b77-8693-91b0e343f565%40googlegroups.com.

No comments:

Post a Comment