Have you read the Rails API docs and Rails Guides for usage of form_with? https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with https://guides.rubyonrails.org/form_helpers.html
On Mon, Nov 18, 2019 at 2:25 PM fugee ohu <fugee...@gmail.com> wrote: > Trying to build a rails 5.2 form using form_with I get this error: > ActionView::Template::Error (wrong number of arguments (given 1, expected > 0)): > > <%= form_with @item, url: new_item_path, method: 'get' do |f| %> > > <div class="field"> > <%= f.select :item, :item_type_id, ItemType.all, :id, :name %> > </div> > > <div class="actions"> > <%= f.submit "New item" %> > </div> > > <% end %> > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/06504cd7-6a1a-4d24-84a3-c63f5113197c%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/06504cd7-6a1a-4d24-84a3-c63f5113197c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAJ6MPzJ9Kw6vfWSXO0AiFPFJOwfQHzE3TpmvoSNwgNpYsX-eSg%40mail.gmail.com.