title: has_ancestry and active model serializers
body: <p>I have a model <code>Category</code></p>
  
  <pre><code>class Category &lt; ActiveRecord::Base
    attributes :id, :name, :order, :x, :y, :z
    has_ancestry
  end
  </code></pre>
  
  <p>In my controller, I can use the following to get the whole tree as JSON</p>
  
  <pre><code>Category.first.subtree.arrange_serializable
  </code></pre>
  
  <p>But this returns all DB attributes such as <code>created_at</code> or <code>id</code></p>
  
  <p>I wanted to use the active model serializer to shape my output without losing the tree structure.</p>
  
  <pre><code>class CategorySerializer &lt; ActiveModel::Serializer
    # Children is the subtree provided by ancestry
    attributes :name, :x, :children
  end
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>class CategoryController &lt; ActionController::Base
    def index
      category = Category.first
      render :json =&gt; category
    end
  end
  </code></pre>
  
  <p>The code above will only show the first sub level, but not the children of the children.
  Any help appreciated </p>