Date_select help

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.


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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs