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 had rails 4.2 and ruby 2.3.5 and I'm upgrading it to rails 5.2 with ruby 2.6.1. With older rails version(4.2) my UserAuthenticatedSerializer is working fine and was giving proper response. After upgrading to rails 5.2
my Serializer throwing argument error. I debugged it and it's throwing from relationship.rb file, method name fetch_id and fetch_associated_object Here in both methods, object_block.call(record, params) throwing me argument error. If I remove second parameter params it works fine but passing this two arguments causing me error.
This same association work with rails 4.2 but it's not working in rails 5.2.
Here is my code snap : response = UserAuthenticatedSerializer.new(@user, { params: { domain: current_domain } }).to_json error = ArgumentError (wrong number of arguments (given 1, expected 0))
#user_authenticated_serializer.rb ===>
class UserAuthenticatedSerializer
include FastJsonapi::ObjectSerializer
has_one :user_profile, serializer: UserProfileSerializer, &:user_profile
has_many :user_topic_label_order, &:user_topic_label_order
end