We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrading to Rails 8.0.0, all serializers fail when a controller calls render json: <model instance> with the error:
render json: <model instance>
can't modify frozen Hash: {:serialization_context=>#<ActiveModelSerializers::SerializationContext:0x000000012b99a008 @request_url="http://127.0.0.1:3000/things/1", @query_parameters={}, @url_helpers=#<Module:0x0000000128bf4ec8>, @default_url_options={}>, :namespace=>nil}
Same application/serializers works fine with Rails 7.2.1.1.
(If you believe that this issue should instead be reported to rails/rails, please feel free to close as such)
rails _8.0.0_ new MyApp --api bundle add active_model_serializers rails generate scaffold Thing name:string rake db:migrate rails console <<< 'Thing.create!(name: "test")' rails server curl http://127.0.0.1:3000/things/1
ActiveModelSerializers Version (commit ref if not on tag): 0.10.14
Output of ruby -e "puts RUBY_DESCRIPTION": ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]
ruby -e "puts RUBY_DESCRIPTION"
OS Type & Version: macOS 15.1.1
Integrated application and version (e.g., Rails, Grape, etc): Rails 8.0.0
The text was updated successfully, but these errors were encountered:
(Sorry, accidentally created using the wrong user account. Will close and recreate with a different user.)
Sorry, something went wrong.
Should be fixed in 0.10.15
No branches or pull requests
Expected behavior vs actual behavior
After upgrading to Rails 8.0.0, all serializers fail when a controller calls
render json: <model instance>
with the error:Same application/serializers works fine with Rails 7.2.1.1.
(If you believe that this issue should instead be reported to rails/rails, please feel free to close as such)
Steps to reproduce
Environment
ActiveModelSerializers Version (commit ref if not on tag): 0.10.14
Output of
ruby -e "puts RUBY_DESCRIPTION"
: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]OS Type & Version: macOS 15.1.1
Integrated application and version (e.g., Rails, Grape, etc): Rails 8.0.0
The text was updated successfully, but these errors were encountered: