To override your root nodes for ActiveModel serializers without a global config use the following. This makes a consistent API for clients regardless of model but still leaves your code flexible.
# Controller render json: @liked, root: 'data' # Returns a collection like so. { "data" [{}, {}, {}] } |