title: Customize/modify Rails 3 resources routing
body: <p>I'm currently writing a rails app that has your regular resource like objects. However I would like to make my resources syncable. My web application uses web offline storage to cache results from the server (user's cannot modify data on server making syncing easier). When I fetch from the server, it returns a hash response like:</p>
  
  <pre><code>{
    :new =&gt; [...]
    :updated =&gt; [...]
    :deleted =&gt; [...]
  }
  </code></pre>
  
  <p>This is all well and good until I want to have a regular fetch method that doesn't do any sort of syncing and simply return an array of models</p>
  
  <p>Now my question is I want to create a method in my <code>routes.rb</code> file that sets up routes so that I have a route to <code>synced_index</code> and <code>index</code>. Ideally, I'd be able to do something like this:</p>
  
  <pre><code>synced_resources :plans
  </code></pre>
  
  <p>And then all of the regular resource routes would be created plus a few extra ones like <code>synced_index</code>. Any ideas on how to best do this?</p>
  
  <p>Note: I do know that you can modify resources with <code>do...end</code> syntax but I'd like to abstract that out into a function since I'd have to do it to a lot of models.</p>