Skip to content

uninitialized constant GroupsController::SerializableGroup #114

@chrisgeek

Description

@chrisgeek

Hi, I am trying to switch from AMS to jsonapi-rails gem, but after creating serializers, I still get an uninitialized constant GroupsController::SerializableGroup error message from the gem

def index
    groups = Group.all
    render jsonapi: groups, class: {Group: SerializableGroup } 
end

serializers/group_serializer.rb

class SerializableGroup < JSONAPI::Serializable::Resource
  type 'group'
  has_many :users
  attributes :name
end

I'm not sure what I am doing wrong really.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions