I am trying to create a small rails blog, and have run into an error. I think I've messed up the naming convention of something here... but I can't find anything specific enough to help me and give me the answer.
I have a route of
resources :blog
and a controller which has the following
class BlogController < ApplicationController
def index
@blogs = Blog.all
end
def show
@blog = Blog.find(params[:id])
end
def new
@blog = Blog.new
end
end
When I try to set up a form on the new.html.erb page, it links to routing which states
undefined method `blogs_path'
My route is blog, not blogs... where am I going wrong? I would like the route to be /blog.
resources :blogsas resources are usually in plural form.