aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/date.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use `inspect` in `type_cast_for_schema` for date/time and decimal valuesRyuta Kamizono2016-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently dumping defaults on schema is inconsistent. Before: ```ruby create_table "defaults", force: :cascade do |t| t.string "string_with_default", default: "Hello!" t.date "date_with_default", default: '2014-06-05' t.datetime "datetime_with_default", default: '2014-06-05 07:17:04' t.time "time_with_default", default: '2000-01-01 07:17:04' t.decimal "decimal_with_default", default: 1234567890 end ``` After: ```ruby create_table "defaults", force: :cascade do |t| t.string "string_with_default", default: "Hello!" t.date "date_with_default", default: "2014-06-05" t.datetime "datetime_with_default", default: "2014-06-05 07:17:04" t.time "time_with_default", default: "2000-01-01 07:17:04" t.decimal "decimal_with_default", default: "1234567890" end ```
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-25/+25
|
* Fix `Type::Date#serialize` to return a date object correctlyRyuta Kamizono2016-06-161-0/+4
| | | | | | | | Currently `Type::Date#serialize` does not cast a value to a date object. It should be cast to a date object for finding by date column correctly working. Fixes #25354.
* Move ActiveRecord::Type to ActiveModelKir Shatrov2015-09-211-0/+50
The first step of bringing typecasting to ActiveModel