What is this code add_to_serializer in all these plugins

If possible, can you please share the link of the plugin that you were working on at that time?

「いいね!」 1

Thanks for the great explanations. Am I right to assume that it would be possible to use add_to_serializer, something like op_likes? I’m not sure why this happens, but I can only have access to the op_likes_count when I order by it (as in order=op_likes), but I wanted to have such numbers without having to order by it.

Is there also a way to use it from JavaScript? I’m currently looking at `showOpLikes` doesn't work right away, but after clicking back and forth - #6 by pfaffman which was closed.

No, you can’t change an API from a client :slight_smile:

「いいね!」 1

This should absolutely not be the default. Not all user custom fields should be displayed to the user (e.g. see Staff Notes).

「いいね!」 5

UIでカスタムユーザーフィールドを作成する際に、「シリアライザーに追加」をチェックボックスにすることは可能でしょうか。そして、PRではカスタムユーザーフィールドに「シリアライザーに追加」が設定されているかを確認し、もしそうであれば追加するという処理を行うことができます。

「いいね!」 4

5件の投稿が新しいトピックに分割されました:ユーザーシリアライザーへの追加は現在のユーザーオブジェクトで機能しません