2009/10/2 adedip <[email protected]>: > > or maybe I'm wrong about the type... > here's the form code in the view: > > <% @source = Article.find(:all) %> > From: > <%= collection_select("from", "date", @source, "date","date", > {:include_blank => true}) %> > To: > <%= collection_select("to", "date", @source, "date","date", > {:include_blank => true}) %>
If you are using params[:from] then it is a string. params[] are always strings. The fact that you keep saying it is in yyyy-mm-dd format does not make sense if it is a Date as a Date is not in a particular format till you convert it to string for display for example. Build a Date from the string and then you can compare it with your db value. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

