title: How would I add /api to these routes
body: <p>So I have bunch of routes that I can access through like localhost:3000/posts  localhost:3000/users</p>
  
  <p>config/routes.rb looks like this</p>
  
  <pre><code>resources :posts do                                                                                                                                                                                             
      resources :comments, shallow: true do                                                                                                                                                                         
        delete :destroy_all, on: :collection                                                                                                                                                                        
      end                                                                                                                                                                                                           
      resources :images, shallow: true                                                                                                                                                                              
    end                                                                                                                                                                                                             
  
    resources :comments, only: [:new]                                                                                                                                                                               
    resources :users                                                                                                                                                                                                
  
    root 'welcome#index'
  </code></pre>
  
  <p>How can I modify it so I also have normal access and also API access to them such as
  <a href="http://localhost:3000/api/posts" rel="nofollow">http://localhost:3000/api/posts</a>
  <a href="http://localhost:3000/api/users/new" rel="nofollow">http://localhost:3000/api/users/new</a> and such</p>