aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type
Commit message (Collapse)AuthorAgeFilesLines
* Removed unused `klass` definitions from typesSean Griffin2014-06-066-21/+0
| | | | Only `Date` and `Time` are handled.
* Don't mess with `_before_type_cast` for numeric typesSean Griffin2014-06-061-7/+8
|
* serialized Type should delegate `type_cast_for_write` to underlying TypeYves Senn2014-06-061-1/+1
| | | | | | | This adds a regression test for #14411, which was fixed by #15503. Closes #14411 Closes #14595
* Merge pull request #15486 from sgrif/sg-binary-quotingMatthew Draper2014-06-041-0/+18
|\ | | | | Refactor quoting of binary data to not be based on the column type
| * Refactor quoting of binary data to not be based on the column typeSean Griffin2014-06-031-0/+18
| |
* | Refactor determination of whether the field has changedSean Griffin2014-06-033-0/+36
|/ | | | | The types know more about what is going on than the dirty module. Let's ask them!
* docs, fix typo [ci skip]Yves Senn2014-06-021-2/+2
|
* Remove most code related to serialized propertiesSean Griffin2014-06-012-25/+11
| | | | | | | | | | | Nearly completely implemented in terms of custom properties. `_before_type_cast` now stores the raw serialized string consistently, which removes the need to keep track of "state". The following is now consistently true: - `model.serialized == model.reload.serialized` - A model can be dumped and loaded infinitely without changing - A model can be saved and reloaded infinitely without changing
* refactor, introduce `Type#type_cast_for_schema` to cast for schema.rbYves Senn2014-05-304-0/+16
| | | | | | | This removes the case statement in `SchemaDumper` and gives every `Type` the possibility to control the SchemaDumper default value output. /cc @sgrif
* Move `type_cast_for_write` behavior over to the serialized type objectSean Griffin2014-05-292-8/+38
|
* Refactor serialized types to be partially defined as custom propertiesSean Griffin2014-05-292-0/+32
| | | | | | | Many of the methods defined in `AttributeMethods::Serialization` can be refactored onto this type as well, but this is a reasonable small step. Removes the `Type` class, and the need for `decorate_columns` to handle serialized types.
* Move types to the top level `ActiveRecord` namespaceSean Griffin2014-05-2716-0/+439
`ActiveRecord::ConnectionAdapters::Type::Value` => `ActiveRecord::Type::Value`