Well right now i'm currently trying to make a form that posts
information into my database. I'm using the form_for function, but
when i run the server and go to the page and get this error:
undefined method `posts_path' for #<ActionView::Base:0x23bbabc>
So i have no idea what i'm doing wrong, here is the code for the form:
<% form_for(@posts) do |p| %>
<%= p.error_message %>
Well right now i'm currently trying to make a form that posts
information into my database. I'm using the form_for function, but
when i run the server and go to the page and get this error:
undefined method `posts_path' for #<ActionView::Base:0x23bbabc>
You can only use named routes (which form_for uses when you pass it an AR object) if you declare them. This is done with the map.resource and map.resources methods in your config/routes.rb file. Read up on named routes.