rails/rails — pull request #6873 by mauricio (2012-06-27 03:20:02+00:00)
Title: Fixes #6825, adds tests covering cases and error possibilities

The current implementation on Rails is not capable of handling an object with time only, it only allows you to create an object with both time and date, which isn't really nice as you can create a time only column in almost all database systems.

This fix adds support for time only object creation (if the column is created as :time) by using Ruby's Time object. The date fields will default to "January 1, 1970" since Ruby doesn't have an object for time only. Implementation also includes specs showing what's the correct behavior and also a failure if you try to create a time only object of a column of type datetime.

This pull request fixes issue #6825.