# Sending the values of Date\_select form field through Post

**URL:** <https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986>\
**Category:** Rails\
**Created:** [September 26, 2006, 5:31am UTC](https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986 "2006-09-26T05:31:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lakshan\_Perera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ecc23a/32.png) [@Lakshan\_Perera](https://www.ruby-forum.com/u/Lakshan_Perera)\
**Post date:** [September 26, 2006, 5:31am UTC](https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986/1 "2006-09-26T05:31:54Z")

</div>

I’ve got a form which only consists of two Date\_select elements, which  
sends two date values to a action in same controller to retrive some  
data.

This works fine when I test in my local machine with web brick server.  
But once I upload the app to the host (DreamHost server), the  
date\_select parameters doesn’t seem to get posted to the action. Which  
results in Action Controller returning an error with nil objects. Also  
request parameters of the section shows as none. So it seems the error  
is due to the no parameter values were posted.

What prevents parameter values get posted on the server ? Can anyone  
help me to clarify the issue?

---

<div class="post-metadata">

**Author:** ![Lakshan\_Perera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ecc23a/32.png) [@Lakshan\_Perera](https://www.ruby-forum.com/u/Lakshan_Perera)\
**Post date:** [September 28, 2006, 4:50am UTC](https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986/2 "2006-09-28T04:50:44Z")

</div>

Probably not the problem, but is the host running on production mode?  
In which case you have to restart the Rails App for it to work?

common gotcha I thought I’d point out.

---

<div class="post-metadata">

**Author:** ![Lakshan\_Perera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ecc23a/32.png) [@Lakshan\_Perera](https://www.ruby-forum.com/u/Lakshan_Perera)\
**Post date:** [September 28, 2006, 8:59am UTC](https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986/3 "2006-09-28T08:59:15Z")

</div>

No the host is running on development mode.

Any Clues ?

---

<div class="post-metadata">

**Author:** ![Lakshan\_Perera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ecc23a/32.png) [@Lakshan\_Perera](https://www.ruby-forum.com/u/Lakshan_Perera)\
**Post date:** [April 11, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/sending-the-values-of-date-select-form-field-through-post/69986/4 "2007-04-11T15:00:54Z")

</div>

Hello,

May you tell me how do u perform a search based on two date in your  
controller, using two date\_select in your view ? I am trying to do the  
same but i obtain this :

Mysql::Error: #42000You have an error in your SQL syntax; check the  
manual that corresponds to your MySQL server version for the right  
syntax to use near ‘:date\_sortie) AND ( (offres.`type` = ‘Album’ ) )’  
at line 1: SELECT \* FROM offres WHERE (date\_sortie \> :date\_sortie) AND  
( (offres.`type` = ‘Album’ ) )

Thanks in advance.

On 25 sep 2006, 23:31, Lakshan Perera \<rails-mailing-l…@andreas-
