jsonapi-rb / jsonapi-rails

Rails gem for fast jsonapi-compliant APIs.
http://jsonapi-rb.org
MIT License
319 stars 63 forks source link

Resource meta is not rendered #90

Closed jandudulski closed 2 years ago

jandudulski commented 6 years ago

When I define meta on the resource like in docs:

class SerializablePost < JSONAPI::Serializable::Resource
  type 'posts'

  meta do
    { featured: true }
  end
end

and render it:

class PostsController < ActionController::API
  def show
    post = Post.find(params[:id])
    render jsonapi: post
  end
end

It doesn't include resource meta.

siepet commented 6 years ago

Can you provide a link to sample rails working app with this issue? Just tested with my setup, and all worked.