# Url\_for - results inconsistency?

**URL:** <https://www.ruby-forum.com/t/url-for-results-inconsistency/57481>\
**Category:** Rails\
**Created:** [April 11, 2006, 11:46am UTC](https://www.ruby-forum.com/t/url-for-results-inconsistency/57481 "2006-04-11T11:46:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![l00pek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/58f4c7/32.png) [@l00pek](https://www.ruby-forum.com/u/l00pek)\
**Post date:** [April 11, 2006, 11:46am UTC](https://www.ruby-forum.com/t/url-for-results-inconsistency/57481/1 "2006-04-11T11:46:46Z")

</div>

Hi all,

I recently noticed something really weird in url\_for results  
let’s say that we have something like this somewhere in code

```
URL1:<%=url_for( {:action=>'foobar'}.merge({'action'=>'ohmy'}) )%>
URL2:<%=url_for( {'action'=>'ohmy'}.merge({:action=>'foobar'}) )%>
```

and then please consider following two cases…

case 1. webrick, ruby 1.8.4, rails 1.0  
result:  
URL1:…/foobar  
URL2:…/foobar

case 2: lighttpd-1.4.11, ruby 1.8.4, rails 1.0  
result:  
URL1:…/ohmy  
URL2:…/ohmy

What is the cause of such behavior, and is there any way to avoid this  
kind of inconsistency ?  
Can this be treated as a bug ?

–l00pek
