aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/coders
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug in JSON deserialization when column default is an empty stringJohannes Opper2016-02-221-0/+15
| | | | | | | | | | | | | | | | | | | | | When `ActiveRecord::Coders::JSON` serialization is used and the default of the column returns `''` it raises the following error: ``` JSON::ParserError: A JSON text must at least contain two octets! ``` If MySQL is running in non-strict mode, it returns an empty string as column default for a text column: ```ruby def extract_default if blob_or_text_column? @default = null || strict ? nil : '' end end ``` Since `''` is invalid JSON, there shouldn't be an attempt to parse it, it should be treated like nil. ActiveRecord::Coders::JSON should behave consistently for all possible non-user-set column default values.
* Remove all error masking when decoding serialized data fails?Mike Mangino2013-04-021-2/+4
|
* Raise an exception when unserialization fails due to a missing classMike Mangino2013-03-281-0/+8
|
* ActiveRecord::Coders::YAMLColumn#dump should raise an errorGuten2012-03-261-0/+7
| | | | | | | | closes #2737 Conflicts: activerecord/lib/active_record/coders/yaml_column.rb
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+2
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-2/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Make serialized columns with explicit object_type return a new instance of ↵Guillermo Álvarez2011-02-031-2/+3
| | | | the object instead of nil
* adding a YAML Column coder for YAML serialization to db columnsAaron Patterson2011-02-011-0/+45