Nested routes problems

0 views
Skip to first unread message

Nike Mike

unread,
Nov 9, 2009, 8:46:06 AM11/9/09
to rubyonra...@googlegroups.com
Hi i am using nested resources in my application like this

map.resources :forums do |forum|
forum.resources :topics do |topic|
topic.resources :posts
end
end

while i am submitting a from with url like this
http://localhost:3000/forums/1/topics/new

i am facing the problem

"Only get, put, and delete requests are allowed."

Please help me
--
Posted via http://www.ruby-forum.com/.

Jeff

unread,
Nov 9, 2009, 11:23:49 AM11/9/09
to Ruby on Rails: Talk
On Nov 9, 7:46 am, Nike Mike <rails-mailing-l...@andreas-s.net> wrote:
> Hi i am using nested resources in my application like this
>
>   map.resources :forums do |forum|
>     forum.resources :topics do |topic|
>       topic.resources :posts
>     end
>   end
>
> while i am submitting a from with url like thishttp://localhost:3000/forums/1/topics/new
>
> i am facing the problem
>
> "Only get, put, and delete requests are allowed."
>
> Please help me

map.resources will map http://localhost:3000/forums/1/topics/new to a
GET request. Your form should be posting to http://localhost:3000/forums/1/topics/.

Jeff

purpleworkshops.com
Reply all
Reply to author
Forward
0 new messages