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
When the user object is serialized I am getting id as null and rest all the data is correct. I am using active_model_serializers version 0.10.13
class UserSerializer < ActiveModelSerializers::Model attributes :id, :first_name, :last_name, :username end
Getting id as null when checking in the pry using object.id, but getting correct data using object[:id] . I am not sure what could be the reason and it is happening after upgrading rails 5.2 to 6.1. Another catch is, I am getting this error in a specific environment, other than local and stage.
ruby version - 2.7.6
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
When the user object is serialized I am getting id as null and rest all the data is correct. I am using
active_model_serializers
version 0.10.13class UserSerializer < ActiveModelSerializers::Model
attributes :id, :first_name, :last_name, :username
end
Getting id as null when checking in the pry using object.id, but getting correct data using object[:id] . I am not sure what could be the reason and it is happening after upgrading rails 5.2 to 6.1. Another catch is, I am getting this error in a specific environment, other than local and stage.
ruby version - 2.7.6
The text was updated successfully, but these errors were encountered: