samedi 13 juin 2015

How do I update create route from rails 3 to 4

I have a form tag which is seen below, when I try to run the page I get the error: No route matches {:action=>"create", :type=>"new", :controller=>"lists"}

  <%= form_for @list, :url => {:action => "create", :type => "new"}, :html => {:multipart => true,:role=>"form"} do |f| %>

In my routes file i have a line-- resources :lists I thought the line above in the routes file is supposed to create correct routes for me.

Can someone tell me what I am doing wrong?

Aucun commentaire:

Enregistrer un commentaire