1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Andrew White 1b75b94de6 Remove warning by using a custom coder
The native JSON library bypasses the `to_json` overrides in
active_support/core_ext/object/to_json.rb by calling its native
implementation directly. However `ActiveRecord::Store` uses a
HWIA so `JSON.dump` will call our `to_json` instead with a
`State` object for options rather than a `Hash`. This generates
a warning when the `:encoding`, `:only` & `:except` keys are
accessed in `Hash#as_json` because the `State` object delegates
unknown keys to `instance_variable_get` in its `:[]` method.

Workaround this warning in the test by using a custom coder that
calls `ActiveSupport::JSON.encode` directly.
2013-01-23 14:54:56 +00:00
..
active_record/connection_adapters Ensure disconnecting or reconnecting resets the transaction state 2012-09-15 00:03:04 +01:00
assets
cases A test case name needs to start with "test_" 2013-01-23 15:22:13 +09:00
fixtures Rename "Fixtures" class to "FixtureSet" 2012-10-07 19:15:58 +02:00
migrations recognize migrations, in folders containing numbers and 'rb'. 2012-12-13 09:08:32 +01:00
models Remove warning by using a custom coder 2013-01-23 14:54:56 +00:00
schema Support for PostgreSQL's ltree data type. 2013-01-04 21:22:34 +00:00
support Revert "Fix annoy warning, when executing testcase." 2012-11-30 12:07:55 +04:00
.gitignore
config.example.yml Simulated & actual (manual/skipped) PostgreSQL auto-reconnection tests. 2012-07-16 09:55:20 -07:00
config.rb