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 changing model/library methods should serializer reloads all changes.
When I define and change model method:
# app/models/document.rb class Document < ApplicationRecord def url # ... end end
it doesn't autoload in the serializer:
class DocumentSerializer < ActiveModel::Serializer attributes :url end
After request on API it returns the previous version of url, as a result I need to restart Rails server to get changes.
url
#config/initializers/serializer.rb ActiveModelSerializers.config.adapter = :json_api
ActiveModelSerializers Version (commit ref if not on tag): active_model_serializers (0.10.12)
Output of ruby -e "puts RUBY_DESCRIPTION": ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
ruby -e "puts RUBY_DESCRIPTION"
OS Type & Version: Ubuntu 20.04
Integrated application and version (e.g., Rails, Grape, etc): rails (6.1.0) but also (6.1.3)
Also created question https://stackoverflow.com/questions/66496188/problem-with-active-model-serializer-auto-reloading-after-changed-files-in-rails
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behavior vs actual behavior
After changing model/library methods should serializer reloads all changes.
Steps to reproduce
When I define and change model method:
it doesn't autoload in the serializer:
After request on API it returns the previous version of
url
, as a result I need to restart Rails server to get changes.Environment
ActiveModelSerializers Version (commit ref if not on tag):
active_model_serializers (0.10.12)
Output of
ruby -e "puts RUBY_DESCRIPTION"
: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]OS Type & Version: Ubuntu 20.04
Integrated application and version (e.g., Rails, Grape, etc): rails (6.1.0) but also (6.1.3)
Other
Also created question
https://stackoverflow.com/questions/66496188/problem-with-active-model-serializer-auto-reloading-after-changed-files-in-rails
The text was updated successfully, but these errors were encountered: