I'm using active model serializers in my rails app for json, which is working great. Now I also need to export that data as csv and have had to rewrite all of the methods in the serializer for the csv method.
Is there anyway to take the serialized json and convert it to csv? Or a way to share code easily between the model and serializer?
I've never tried it - but there is the as_csv gem.