undefined method `symbol_path'

I am getting following error while creating a new topic using RESTful
design. But, everything works fine when I use <% form_tag :action =>
:create do %> .

ActionView::TemplateError (undefined method `symbol_path' for
#<ActionView::Base:0xb72a2e40>) on line #3 of topics/new.rhtml:
1: <h1>New Topic</h1>
2:
3: <% form_tag :topic, :url => topics_path do %>

form_tag doesn't work like that - the first argument has to be a hash
of routing options or a path. Looks like you were actually trying to
use form_for (or you just wanted form_tag topics_path)

Fred

Thanks Fred...

I referred to
http://ueckerman.net/2007/04/24/the-basics-of-rest-in-rails/ .

Your suggestion worked for creating topic. However, I have nested
resource as topic has_many items. When I use similar form_tag method in
my items, I am getting " undefined local variable or method `items_path'
for #<ActionView::Base:0xb71c205c>" error.
Please see: http://www.ruby-forum.com/topic/180779
I tried it with <% form_tag items_path do %>.

Also if someone could help me in my self-referential associations and
REST topic that would be of really great help.

Thanks,
CS.

Frederick Cheung wrote:

Thanks Fred...

I referred tohttp://ueckerman.net/2007/04/24/the-basics-of-rest-in-rails/.

Your suggestion worked for creating topic. However, I have nested
resource as topic has_many items. When I use similar form_tag method in
my items, I am getting " undefined local variable or method `items_path'
for #<ActionView::Base:0xb71c205c>" error.

that just sounds like your routes.rb is not in sync with what you're
trying to do (since it's from there that the helper methods items_path
and so on are created). You might find http://guides.rubyonrails.org/routing.html
useful

Fred