Ok, cheers for that. I guess I will have to rethink my approach. In defense of my current method, to make sure the date field doesn't accept incorrect input I use ruby's 'Date.strptime' to parse the string as a date. If it works then everything is ok, if it throws an error then I catch this and output the error message that the date is invalid.
>> that make no difference? > You can, of course, do your own sanitizing of input data. But in this > particular case I don't see the point. You still need to avoid anomalies > like February, 31st. I don't see any advantage in doing this stuff > yourself instead of giving ActiveRecord a chance and mop up in case it > indicates a problem. Don't get to enamored with your current approach. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---