rails/activerecord/test/models/admin
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
..
account.rb Support fixtures for namespaced models [#2965 state:resolved] 2010-04-25 16:04:38 +02:00
randomly_named_c1.rb Test fixtures with custom model and table names 2011-12-30 10:34:01 +01:00
user.rb Remove warning by using a custom coder 2013-01-23 14:54:56 +00:00