rails-api / active_model_serializers

ActiveModel::Serializer implementation and Rails hooks
MIT License
5.32k stars 1.39k forks source link

ActionCable support? #2411

Open zedtux opened 3 years ago

zedtux commented 3 years ago

Expected behavior vs actual behavior

When broadcasting an object via ActionCable doesn't seem to being presented by the serializer (while it does when fetched from an API).

It would be great to also have a support for ActionCable :)

Steps to reproduce

  1. Setup a Rails project with ActionCable (server and client side)
  2. Add a channel streaming for the current_user
  3. NotificationsChannel.broadcast_to(current_user, Notification.last)
bf4 commented 3 years ago

I've never used action cable. Does it have a renderer?

zedtux commented 3 years ago

I will try to figure this out.