• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 515
  • Last Modified:

private method `min' called for #<Date: 4899253/2,0,2299161> error

Hi,

I am rewriting PL/SQL appliation to rails and when I clicked 'edit' link(after performing 'generate ...' command) I am having the following error.

19: <p><label for="attending_ip_dob">Dob</label><br/>
20: <%= datetime_select 'attending_ip', 'dob'  %></p>


c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:191:in `select_minute'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:390:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:390:in `date_or_time_select'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:385:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:385:in `date_or_time_select'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:356:in `to_datetime_select_tag_without_error_wrapping'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/active_record_helper.rb:209:in `to_datetime_select_tag'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/date_helper.rb:132:in `datetime_select'
#{RAILS_ROOT}/app/views/attending_ips/_form.rhtml:20:in `_run_rhtml_47app47views47attending_ips47_form46rhtml'
#{RAILS_ROOT}/app/views/attending_ips/edit.rhtml:4:in `_run_rhtml_47app47views47attending_ips47edit46rhtml'
#{RAILS_ROOT}/app/views/attending_ips/edit.rhtml:3:in `_run_rhtml_47app47views47attending_ips47edit46rhtml'
-e:4:in `load'
-e:4

It looks like to me that this is because of the input format (dd/dd/yyyy) that used to take for old app. For example, in the table:
DOB: 1994-10-01 00:00:00.0

However, other auto generated field such as 'LAST_MODIFIED_BY'(type is date) column is working fine.
LAST_MODIFIED_BY: 2007-10-15 18:43:05.0

how can I solve this problem? Is there something other than 'datetime_select'?

thanks in advance
0
dkim18
Asked:
dkim18
1 Solution
 
bobbit31Commented:
if you aren't using date and time, use date_select rather than datetime_select.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now