New issue
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
How to serialize an array? #891
Comments
Use ArraySerializer as ActiveModel::ArraySerializer.new(@records, each_serializer: RecordSerializer).to_json |
@prasadsurase that used to be the case in 0.9.3. I'm trying to upgrade to 0.10.0.rc1 and finding that ActiveModel::ArraySerializer doesn't exist anymore… |
Looks like it moved to ActiveModel::Serializer::ArraySerializer. |
I fixed the problem, thanks :). |
Tks everyone 😄 you're awesome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting the following error:
NoMethodError - undefined method `read_attribute_for_serialization' for #Array:0x007fd3e1151898
Ruby code in controller:
The text was updated successfully, but these errors were encountered: