title: use a different index column for loading models in rails 3
body: <p>In my app users can store private trades in their accounts, such trades are visible only to them. </p>
  
  <p>The Trade model looks like this: </p>
  
  <pre><code>class Trade &lt; ActiveRecord::Base
  
    scope :by_user, lambda { |user|
      where(user_id: user.id) unless user.nil?
    }
  
    belongs_to :status
    belongs_to :user
  </code></pre>
  
  <p>the route looks like this: </p>
  
  <pre><code>resources :users do 
    resources :trades
  end
  </code></pre>
  
  <p>so generating urls like: </p>
  
  <pre><code>/users/:user_id/trades/:id/edit
  </code></pre>
  
  <p>Currently for example, if there are three trades stored in the system, a new user, when creating his first trade would be creating a trade with id = 4, and his URL to find it would be: <code>/users/2/trades/4</code> </p>
  
  <p>I would like to have the trades to have a new <code>sequence_number</code> column and this to be used in the id to find the trades. </p>
  
  <p>So every user will see only his/her trades, and they will be all numbered starting from 1. </p>