Check your routes file for the routes for *post*. If you scaffolded the model, then there should be resources :post in your routes.rb file.
If the above is not there, just add the line and you will get the routes for CRUD automatically. On Fri, May 20, 2011 at 2:22 PM, John shelfer <[email protected]>wrote: > I tried to generate a form it says "undefined method `posts_path' for > #<#<Class:0xb6784798>:0xb67817f0>" > The following code at line number 2 gives the error. > > > <%= link_to 'New Post'%> > <%= form_for(@post) do |f| %> > <div class="field"> > <%= f.label :name %><br /> > <%= f.text_field :name %> > </div> > <div class="field"> > <%= f.label :title %><br /> > <%= f.text_field :title %> > </div> > <div class="field"> > <%= f.label :content %><br /> > <%= f.text_area :content %> > </div> > <div class="actions"> > <%= f.submit %> > </div> > <% end %> > > > John > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

