You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect to be able to use AMS without active_record. What I'm seeing is that to_json won't serialize the serializer adapter instance correctly if I don't explicitly call as_json before hand. If I load active_record and establish a database connection a simple call to to_json will work as expected
Although I originally found this dependency issue with active_record in one of our apps @groyoh noticed that requiring active_support/json is enough to fix the behavior of to_json
The text was updated successfully, but these errors were encountered:
Expected behavior vs actual behavior
I expect to be able to use AMS without active_record. What I'm seeing is that
to_json
won't serialize the serializer adapter instance correctly if I don't explicitly callas_json
before hand. If I load active_record and establish a database connection a simple call toto_json
will work as expectedSteps to reproduce
Please have a look at this gist
https://gist.github.com/andreaseger/84edad45b690b142c401a170b742aafb
Environment
ActiveModelSerializers Version (commit ref if not on tag): latest master (d30aa4c)
Output of
ruby -e "puts RUBY_DESCRIPTION"
:ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
Additonal helpful information
Although I originally found this dependency issue with active_record in one of our apps @groyoh noticed that requiring
active_support/json
is enough to fix the behavior ofto_json
The text was updated successfully, but these errors were encountered: