aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/coders
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-192-0/+4
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-022-2/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-012-0/+2
|
* :scissors:Ryuta Kamizono2017-04-131-1/+0
| | | | [ci skip]
* Indicate action that failed in YamlColumnKir Shatrov2017-02-051-4/+4
|
* Report the attribute on ActiveRecord::SerializationTypeMismatchKir Shatrov2017-01-291-11/+13
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* 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