title: Rails view Helper function and the link_to function
body: <p>I am trying to create a helper function (eg in <code>application_helper.rb</code>) that generates a <code>link_to</code> based on parameters passed in to the helper function. If I were putting the link in an ERB file it would be of the format:  </p>
  
  <pre><code>&lt;%= link_to 'Some Text', { :controller =&gt; 'a_controller', :action =&gt; 'an_action' } %&gt;
  </code></pre>
  
  <p>In the helper function, the Text, Controller and Action are all passed in or calculated. The code in the helper function is:</p>
  
  <pre><code>params = "{ :controller =&gt; '#{controller}', :action =&gt; '#{action_to_take}'}"
  html   = "#{link_to some_text, params }&lt;p /&gt;"
  return html
  </code></pre>
  
  <p>The link that is generated has the correct text, however the parameters are literally the contents of the <code>params</code> string. </p>
  
  <p>How can I get the <code>params</code> string to be evaluated (as it is in an ERB file)?</p>