I'd like to simple_format the body of my CommentSerializer. I have:
class CommentSerializer < ActiveModel::Serializer
attributes :id, :body
def body
simple_format(body)
end
but this goes into a recursive call. Ideally, I'd like to keep the body
attribute as there is already front-end code using it. What would be an easy way to add this?