aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/date_time.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-2/+2
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-19/+19
|
* Fixed taking precision into count when assigning a value to timestamp attributeBogdan Gusiev2015-09-231-4/+4
| | | | | | | | | | | | | | | | | Timestamp column can have less precision than ruby timestamp In result in how big a fraction of a second can be stored in the database. m = Model.create! m.created_at.usec == m.reload.created_at.usec # => false # due to different seconds precision in Time.now and database column If the precision is low enough, (mysql default is 0, so it is always low enough by default) the value changes when model is reloaded from the database. This patch fixes that issue ensuring that any timestamp assigned as an attribute is converted to column precision under the attribute.
* Move ActiveRecord::Type to ActiveModelKir Shatrov2015-09-211-0/+44
The first step of bringing typecasting to ActiveModel