ruby-grape / grape-active_model_serializers

User active_model_serializers with Grape
MIT License
140 stars 68 forks source link

Custom Metadata not woking #93

Closed lieunttuit closed 2 years ago

lieunttuit commented 2 years ago

Hi! I try to use custom metadata to add token included to response In rails 6.

get 'users', serializer: UserSerializer do
   authenticate_request!
   collection = User.all
   render collection, { meta: { token: "token key" }, meta_key: :token_info }
end

But It's just return list user. How i can use custom metadata at this case ? Thank you

Gem.lock

grape-active_model_serializers (1.5.2)
      active_model_serializers (>= 0.10.0)
      grape (>= 0.8.0)