# Plus sign not passed in parameters

**URL:** <https://www.ruby-forum.com/t/plus-sign-not-passed-in-parameters/70000>\
**Category:** Rails\
**Created:** [September 26, 2006, 10:09am UTC](https://www.ruby-forum.com/t/plus-sign-not-passed-in-parameters/70000 "2006-09-26T10:09:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_De\_Berdt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/53a042/32.png) [@Peter\_De\_Berdt](https://www.ruby-forum.com/u/Peter_De_Berdt)\
**Post date:** [September 26, 2006, 10:09am UTC](https://www.ruby-forum.com/t/plus-sign-not-passed-in-parameters/70000/1 "2006-09-26T10:09:54Z")

</div>

Hi

Running Rails 1.1.6.

This is what’s being passed to rails through a GET request:  
Parameters: {“month”=\>“10”, “title”=\>“Jurassic 5 The Compositive  
Two”, “action”=\>“index”, “controller”=\>“events”, “day”=\>“8”,  
“year”=\>“2006”}

It should read:  
Parameters: {“month”=\>“10”, “title”=\>“Jurassic 5 + The Compositive  
Two”, “action”=\>“index”, “controller”=\>“events”, “day”=\>“8”,  
“year”=\>“2006”}

The link itself reads:  
[http://www.thedomain.com/events/2006/10/8/Jurassic+5+%2B+The](http://www.thedomain.com/events/2006/10/8/Jurassic+5+%2B+The)  
+Compositive+Two

The title is passed off to a search query, which effectively returns  
0 records, as it’s missing the + sign, the query reads “SELECT \* FROM  
events WHERE title=‘Jurassic 5 The Compositive Two’ …”

Is this a bug in rails? I’ve searched trac, but didn’t find anyone  
with a similar problem.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![Peter\_De\_Berdt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/53a042/32.png) [@Peter\_De\_Berdt](https://www.ruby-forum.com/u/Peter_De_Berdt)\
**Post date:** [September 26, 2006, 10:46am UTC](https://www.ruby-forum.com/t/plus-sign-not-passed-in-parameters/70000/2 "2006-09-26T10:46:14Z")

</div>

> Is this a bug in rails? I’ve searched trac, but didn’t find anyone with a  
> similar problem.

I wonder if it’s decoding the uri twice somehow, resulting in the  
encoded + sign being turned into a space.

---

<div class="post-metadata">

**Author:** ![Peter\_De\_Berdt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/53a042/32.png) [@Peter\_De\_Berdt](https://www.ruby-forum.com/u/Peter_De_Berdt)\
**Post date:** [September 26, 2006, 11:40am UTC](https://www.ruby-forum.com/t/plus-sign-not-passed-in-parameters/70000/3 "2006-09-26T11:40:21Z")

</div>

On 26 Sep 2006, at 10:41, snacktime wrote:

> > Is this a bug in rails? I’ve searched trac, but didn’t find anyone  
> > with a  
> > similar problem.
> 
> I wonder if it’s decoding the uri twice somehow, resulting in the  
> encoded + sign being turned into a space.

Yes, that’s what I was thinking too, but suspecting this doesn’t  
solve the problem, does it 😉

I know for a fact that my code is doing nothing fancy to cause this  
to happen. I’ve been browsing through the source of rails, but I  
found nothing in the last three hours, I was hoping someone else  
would have solved the same problem. Guess I know what to do tonight…

Best regards

Peter De Berdt
