Closed orafaelfragoso closed 9 years ago
HI; its been a long time since I looked at this; you can parse a version option either when using render method at the controller level; as that will pass the options along;
render @user, {version: 2}
or even better is at the controller level namespace you could define
def default_serializer_options
{
version: 2
}
end
I think from reading latest docs; 0.8 will be looking to remove options so not sure how it could work then; but then I am not sure how one would change the root option either;
anyway hope this helps
+1
Hi,
I'm using a namespaced route to version my API:
I already configured my Serializer with this gem but the documentation is not clear enough and I don't know where to specify the serializer version dynamically.
I want them to load the right version based on the namespace 'v1, v2...'. How can I do that?