# Form\_for problem with singular resource

**URL:** <https://www.ruby-forum.com/t/form-for-problem-with-singular-resource/153378>\
**Category:** Rails\
**Created:** [November 15, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/form-for-problem-with-singular-resource/153378 "2008-11-15T23:32:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe-black](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Post date:** [November 15, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/form-for-problem-with-singular-resource/153378/1 "2008-11-15T23:32:48Z")

</div>

Can you use polymorphic urls with form\_for when you have a singular  
resource?

In routes.rb  
map.resource :blog

In BlogsController  
def new  
@blog = Blog.new  
end

In new.html.erb  
\<% form\_for @blog do |f| %\>  
…  
\<% end %\>

But the view is giving me the following error.

undefined method `blogs\_path’ for #ActionView::Base:0xb691281c

I do not know why @blog is converting into blogs\_path. Shouldn’t it be  
converted to create\_blog\_path since @blog is a new record? If it was an  
existing record I would assume it would go to update\_blog\_path or  
something.

Can someone please explain what I am doing wrong.
