Search dates by params


#1

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:

Checkin date
<%= date_select 'checkin_date', params[:checkin_date] %>

But it doesn’t wok…
Could you tell me how to do it?
Thank you!!!


#2

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