Closed utkarshvaish9 closed 5 years ago
You can override the attributes as stated in the docs here: https://hexdocs.pm/ja_serializer/JaSerializer.Serializer.html#c:attributes/2 You can then define multiple attributes function and pattern match on that.
I want to render attributes corresponding to the rendering call. For ex, if one attribute is defined as a list of all the elements in the table, I should be able to define another attribute with only some of the elements of the table, meaning for show page, I should have all the elements and for index page(since I don't need all of them) I should have only selected.