Rails + Friendly ID: Have some paths use the numerical ID
<p>I have a Rails application that uses the <code>friendly_id</code> Gem.</p>

<p>Using Friendly ID works well.</p>

<p>However, there are some paths in the backoffice where I do not want to use the Friendly ID slug in the URI, as it is not possible to use the same scopes as in the front-end.</p>

<p>e.g. I have an article that can have multiple versions. On each <em>blog</em> on the front, another article version is shown. Therefore, I can use <code>@blog.articles.friendly.find(params[:id])</code>. However, in the backoffice, I have pages where people can edit such a version, which is <strong>not</strong> nested under a Blog (because it is possible for a version to change blog using the form). Therefore, article versions that have the same slug as an earlier one will become inaccessible.</p>

<p>How can I instruct <code>friendly_id</code> and/or the Rails URL helper to not use the slug for these paths, but just use the good old numerical ID instead? </p>