title: Routing concerns defining different param for resources
body: <p>Recently I got to know about rails concerns in routes from this discussion
  <a href="https://stackoverflow.com/questions/31725697/how-to-have-same-routes-with-and-without-namespace-rails-4">How to have one resource in routes for namespace and root path altogether - Rails 4</a>. Now in my application I have routes like this:</p>
  
  <pre><code>namespace :admin do
    resources :photos
    resources :businesses
    resources :projects
    resources :quotes
  end
  resources :photos, param: 'slug'
  resources :businesses, param: 'slug' do
    resources :projects, param: 'slug' #As I need both the url one inside business and one outside
  end
  resources :projects, param: 'slug'
  resources :quotes, param: 'slug'
  </code></pre>
  
  <p>And there are many more resources which are repeating as I needed them. I know about concerns how to implement them. With the concerns I can do it like this:</p>
  
  <pre><code>concern :shared_resources do
    resources :photos
    resources :businesses
    resources :projects
    resources :quotes
  end
  namespace :admin do
    concerns :shared_resources
  end
  concerns :shared_resources
  </code></pre>
  
  <p>but how can I give different <code>param</code> each time in the concerns? I tried doing it like this:</p>
  
  <pre><code>concerns :shared_resources, param: 'slug'
  </code></pre>
  
  <p>But this brings no change in the routes. And if I add:</p>
  
  <pre><code>resources :photos, param: 'slug'
  </code></pre>
  
  <p>Then it will add to both the routes slug instead of id. But in admin side I need id and in front end I need slug. So are there any options to pass this in the concerns so to DRY up the code.</p>