I'm wanting a method called same_url? that will return true if the passed in URLs are equal. The passed in URLs might be either params options hash or strings.
same_url?({:controller => :foo, :action => :bar}, "http://www.example.com/foo/bar") # => true
The Rails Framework helper current_page? seems like a good starting point but I'd like to pass in an arbitrary number of URLs.
As an added bonus It would be good if a hash of params to exclude from the comparison could be passed in. So a method call might look like:
same_url?(projects_path(:page => 2), "projects?page=3", :excluding => :page) # => true