> Try running rake routes and see what you get.... then either use what you
> have available or modify so you have the route you want.

Well, that was the problem - it's not about the routes being - it was
about rails doing the wrong thing.

The solution was to put:

[:admin, @company]

And then rails would generate the proper :post and :put routes given
this. It tripped me because there's no way I would have thought of
this...

I mean, to replace a parameter of a model to an array is just strange
for me. It's elegant, but you have to know this in advance - it's
hardly intuitive. Someone would have to tell you or you'd have to look
at the source.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to