Displaying 2 results from an estimated 2 matches for "history_date".
2012 Jan 01
4
Chronic parsing date range in console but not in application in rails 3
...will parse a date range in console:
Chronic.parse(1/1/2011 - 1/1/2012, :guess => false)
=> 2012-01-01 12:00:00 -0500..2012-01-01 12:00:01 -0500
However, when I use logger to check if it''s parsing in application, it
is not:
logger.info "The value of history date is #{history_date}" =>
The value of history date is 1/1/2011 - 1/1/2012
logger.info "The value of date range is
#{ Chronic.parse(history_date, :guess => false)}" => The value of date
range is
See how it returns nil for second logger. I have no clue why it works
fine in console but...
2005 Dec 15
1
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
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_sele...