I have just added the gem 'fast_jsonapi' for serialization of my rails api data into json.
I have a model class of Website created. Below is the serializer class I want to access data through:
class WebsiteSerializer
include FastJsonapi::ObjectSerializer
attributes :name, :image_url, :slug
has_many :reviews
end
So, I run the command below in the rails console.
$ web = Website.first
$ WebsiteSerializer.new(web).serialized_json
It gives the error:
Traceback (most recent call last):
2: from (irb):14
1: from (irb):15:in `rescue in irb_binding'
NameError (uninitialized constant WebsiteSerializer)
The
fast_jsonapi
serializer is no longer supported, usejsonapi-serializer
instead:Jsonapi-serializer