Forum: Ruby on Rails date_select help

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.
0b8601544389bf0603f63bfe5afae865?d=identicon&s=25 Nathan Mealey (Guest)
on 2005-12-15 19: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
  if(@params)
    @notifications = Notification.find(:all, :conditions =>
["date_notified_on = ?", @params['notification']['date_notified_on']])
    render :action => history'
  end
end



The date_select field is this:

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


Any help is really appreciated.



Nathan Mealey

Operations Director

Northeast Region

Pilgrim IT, LLC



NORTHEAST OFFICE

1 Short Street

Northampton, MA 01060

TEL  866.434.4976

FAX  413.587.0572



MIDWEST OFFICE

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.
2dd904ec5981c31e7bb7a5743a53caf8?d=identicon&s=25 Bruce Balmer (brucebalmer)
on 2005-12-15 20:58
(Received via mailing list)
Hi:

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

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