punctuation">.</span><span class="token function">then</span><span class="token punctuation">(</span>transitionToPost<span class="token punctuation">)</span>
  <span class="token punctuation">.</span><span class="token function">catch</span><span class="token punctuation">(</span>failure<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// => POST to '/posts'</span>
<span class="token comment">// => transitioning to posts.show route</span>
<span ari