title: url encode equivalent in ruby on rails
body: <p>Is there an equivalent to PHP's urlencode in Ruby on Rails 2.3.5? (It encodes a string to be used in a query part of a URL)
  I googled it but all the answers seem to date back to before 2006 and seems dates.
  <a href="http://ruby-doc.org/core/classes/CGI.html#M000532" rel="noreferrer">This is what I found</a>. It seems a bit abnormal to call <code>CGI::escape</code> in a view.</p>
  
  <p>Is there an equivalent helper function?</p>
  
  <p>Thanks!</p>