Forum: Ruby on Rails date_select help

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Nathan M. (Guest)
on 2005-12-15 20:19
(Received via mailing list)
I'm trying to select items from a database by their date field. The date
data is coming from a form using the date_select helper.

The field in the database is named date_notified_on.

My controller method is this:

def history_date
    @notifications = Notification.find(:all, :conditions =>
["date_notified_on = ?", @params['notification']['date_notified_on']])
    render :action => history'

The date_select field is this:

<%= date_select("notification", "date_notified_on", :order => [:month,
:day, :year]) %>

Any help is really appreciated.

Nathan M.

Operations Director

Northeast Region

Pilgrim IT, LLC


1 Short Street

Northampton, MA 01060

TEL  866.434.4976

FAX  413.587.0572


1815 Brownsboro Road

Louisville, KY 40206

TEL 502.721.7939

FAX 502.721.7940

NOTICE: This email and any attachments are intended only for the
addressee and may contain information that is confidential and/or
legally privileged. If you are not the intended recipient or have
received this email in error, please notify the sender by return email
or by calling 866-434-4976. You should then delete the message and any
attachments or copies. If you are not the intended recipient, you are
prohibited from retaining, distributing, disclosing or using any
information contained herein.
Bruce B. (Guest)
on 2005-12-15 21:58
(Received via mailing list)

I think you want to remove the ['notification'] from your params

This topic is locked and can not be replied to.