| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
closes #2737
Conflicts:
activerecord/lib/active_record/coders/yaml_column.rb
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
the object instead of nil
|
|
|