title: Ruby: How do I pass all parameters and blocks received by one method to another?
body: <p>I am writing a helper that adds an HTML attribute to a link_to tag in rails. So, my thinking is that my helper method should accept any parameters or blocks passed to it, call link_to with those same parameters, add it's attribute to what is returned, and return the result to the caller.</p>
  
  <p>Like this:</p>
  
  <pre><code>def link_to(*args, &amp;block)
    ... rails code in link_to ...
  end
  
  def myhelper(*args, &amp;block) # Notice that at this point, 'args' has already
    link_to()                 # become an array of arguments and 'block' has
    ... my code ...           # already been turned into a Proc.
  end
  
  myhelper() # Any arguments or blocks I pass with this call should make
             # it all the way through to link_to.
  </code></pre>
  
  <p>So, as you can see, there seems to be no way (that doesn't involve lots of code and conditional branching) to pass what myhelper has received to link_to without turning all of the parameters back into what they looked like before they got to my method.</p>
  
  <p>Is there a more 'Ruby-like' solution to this problem?</p>