Forum: Ruby on Rails Search dates by params

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lucy (Guest)
on 2008-11-22 20:06
(Received via mailing list)
Hi, all

Now I am doing "Hotel" website where users can select room and arrival
and leave dates,
and I can put into shopping cart.
So I want to create a search form where users can select dates
such like:

<p><label for="room_checkin_date">Checkin date</label><br/>
<%= date_select 'checkin_date', params[:checkin_date] %></p>

But it doesn't  wok...
Could you tell me how to do it?
Thank you!!!
Norm (Guest)
on 2008-11-23 00:08
(Received via mailing list)
Lucy wrote:
>
> But it doesn't  wok...
> Could you tell me how to do it?
> Thank you!!!
>
>
The first parameter to date_select should be the 'object' or variable
according to the framework documentation.  The second is the attribute
or member (probably checkin_date in this case).

Norm
This topic is locked and can not be replied to.