How to make action which which will receive parametr and write correct route for it?
===

<p>I need to pass user_id, not logged in user, but user_id from view.<p> I am writing admin part.<p>I'm making post request using user email and redirect to appropriate page. so I want to make route something like:

         /:user_id/pay

to call pay action for appropriate user.
<p>In my view I want to show email and link to this action:

    <% @users.each do |user| %>
     <li>
      <%= user.email %>
      <%= link_to "Pay", some_controller_pay(user.id) %>
     </li>
   <% end %>

In my controller 

        def pay(user)//or what I should transfer here ?
              ...
            data = { ... => user.email,
                     ... => user.amount,}
           res = clnt.post(uri, data, header)
           ...
        end

How I can manage to do this ?