title: In Rails, how do I determine if two URLs are equal?
body: <p>If I have two URLs in Rails, (whether they be in string form or URI objects) what's the best way to determine if they are equal? It seems like a fairly simple problem, but I need the solution to work even if one of the URLs is relative and the other is absolute, or if one of the URLs has different parameters than the other.</p>
  
  <p>I already looked at <a href="https://stackoverflow.com/questions/126332/what-is-the-best-way-in-rails-to-determine-if-two-or-more-given-urls-as-strin">What is the best way in Rails to determine if two (or more) given URLs (as strings or hash options) are equal?</a> (and several other questions), but the question was pretty old and the suggested solution doesn't work the way I need it to.</p>