form_for routing issue

I defined a renew route for membership resources as following :

    scope 'users' do
      resources :memberships do
        member do
          post 'renew'

which leads to:
renew_membership POST (/:locale)/users/memberships/:id/
renew(.:format) {:action=>"renew", :controller=>"memberships"}

and in my view , my form helper is written as :
  = form_for membership, :url => renew_membership_path(membership) do |
generating the following HTML code :

<form accept-charset="UTF-8" action="/en_GB/users/memberships/1034/
renew" class="edit_membership" id="edit_membership_1034"

<div style="margin:0;padding:0;display:inline">
<input name="utf8" type="hidden" value="✓">
<input name="_method" type="hidden" value="put">
<input name="authenticity_token" type="hidden" value="MDNH/

submitting the form, I get a routing error :

Started POST "/users/memberships/1034/renew" for at
2011-06-30 16:33:08 +0200
  Processing by ErrorsController#routing as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"MDNH/
VmfJHBTgur3lksWEEuU5Rp02v70s8UFGR3hxG4=", "commit"=>"Renew this
Membership", "a"=>"users/memberships/1034/renew"}

what could be wrong ?

It seems like you already have a member.

Post works for create. you should be using Put.. because it seems like
an update.