aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/date_time.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add new exception message to datetime from hash castwilddima2018-10-211-3/+3
|
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* Fix `ActiveModel::Type::DateTime#serialize`Lisa Ugray2017-07-051-0/+4
| | | | | `ActiveModel::Type::DateTime#serialize` should return a `Time` object so that finding by a datetime column works correctly.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* 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