Joerg,
Try contact_url(:employer_id => @contact.employer_id, :id =>
@contact.id).
Simply_restful is great but it takes a while to figure out all the
routes the plugin generates. Take a look at Rick Olson''s excellent
routing navigator at:
http://weblog.techno-weenie.net/2006/6/19/new-plugin-routing-navigator
Hope this helps,
Zack
On 7/19/06, Joerg Diekmann <joergd@pobox.com>
wrote:> Hi I have my routes set up like this:
>
> map.resource :contact, :path_prefix =>
"/employers/:employer_id"
>
> so now when I view all contacts for an employer I go to:
>
> /employers/1/contacts
>
> That works. On that page, there''s a problem with the routes:
>
> new_contact_url translates to: /employers/1/contacts/new ... so that
> works.
>
> But, contact_url(@contact) gives me /employers/3/contacts .... which is
> clearly wrong. It should give me something like /employers/1/contacts/3
>
>
>
> Is this a bug? Or am I missing something? Routes and simply_restful work
> fine for me everywhere else.
>
> Thanks
> Joerg
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>