I had a model that should be rendered as JSON, for that I used a serializer
class UserSerializer def initialize(user)