Have a nested resource as such

```
class Dealer < ActiveRecord::Base
  has_many  :vehicles
end

```

and 

```
class Vehicle < ActiveRecord::Base
  belongs_to :dealer
end

```

below are my routes.

```
  resources :dealers do
    resources :vehicles,           :except => [:index]
  end
  resources :vehicles, :only => [:index]

```

looking at the [wiki](https://github.com/ryanb/cancan/wiki/Nested-Resources) at the github page for cancan I did the following:

```
class VehiclesController < ApplicationController
  load_and_authorize_resource :dealer
  load_and_authorize_resource :vehicle, :through => :dealer

  def index
    @vehicles = Vehicle.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @vehicles }
    end
  end
end

```

but now when the admin tries to go to the index page with the abilities:

```
def initialize(user)
  user ||= User.new # guest user (not logged in)
  if user.has_role? :admin
    can     :manage, :all
  end
end

```

I get

```
Couldn't find Dealer with id=

```

what do i need to change for admin to still be able to do all the actions and yet have others be checked before they can do any action.