Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use `inspect` in `type_cast_for_schema` for date/time and decimal values | Ryuta Kamizono | 2016-12-11 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ``` | ||||
* | Moved database-specific ActiveModel types into ActiveRecord | Iain Beeston | 2016-10-14 | 1 | -0/+9 |
| | | | | ie. DecimalWithoutScale, Text and UnsignedInteger | ||||
* | Move ActiveRecord::Type to ActiveModel | Kir Shatrov | 2015-09-21 | 1 | -11/+0 |
| | | | | The first step of bringing typecasting to ActiveModel | ||||
* | Treat strings greater than int max value as out of range | Sean Griffin | 2014-10-31 | 1 | -2/+2 |
| | | | | | | | | | | | Sufficiently large integers cause `find` and `find_by` to raise `StatementInvalid` instead of `RecordNotFound` or just returning `nil`. Given that we can't cast to `nil` for `Integer` like we would with junk data for other types, we raise a `RangeError` instead, and rescue in places where it would be highly unexpected to get an exception from casting. Fixes #17380 | ||||
* | Move types to the top level `ActiveRecord` namespace | Sean Griffin | 2014-05-27 | 1 | -0/+11 |
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value` |