title: How do I create a path to create followers in rails 3?
body: <p>I am using acts_as_followers and want to know have a path that I can pass to a link_to :remote => true link so that a User can follower various different entities.</p>
  
  <p>Here is what I have in the routes (via rake routes)</p>
  
  <blockquote>
    <p>follow<br>
    /users/follow/:followed_type/:followed_id(.:format)
    {:controller=>"users",
    :action=>"follow_this"}</p>
  </blockquote>
  
  <p>This is what is in routes.rb:</p>
  
  <pre><code>match 'users/follow/:followed_type/:followed_id' =&gt; 'users#follow_this', :as =&gt; "follow"
  </code></pre>
  
  <p>But I'm not clear how I pass the values into the URL string using the path helper?  I need to pass in the type as a string (e.g. "Vendor"), and the :id...but how do I do that?</p>
  
  <p>This was i can enable a user to press the link and it will call this action and create the following relationship.</p>
  
  <pre><code>46   def follows_this
   47 
   48     followed_type = params[:followed_type]
   49     followed_class = class_type.camelize.constantize
   50     followed = followed_class.find(params[:followed_id])
   51     current_user.follow(followed)  #uses acts_as_follower plugin
   52 
   53   end
  </code></pre>