Undefined Method Errors


Hi

I'm relative new to RoR - but I'm having a problem with some model
relationships that I thought should have worked. Hope someone can
help.

The code...

MODELS:

class Delivery < ActiveRecord::Base
  belongs_to :vehicle
end

class Vehicle < ActiveRecord::Base
  has_many :deliveries

 def self.find_all_active
    Vehicle.find(:all, :order => 'name', :conditions => ['is_active
= ?', true])
  end

end

CONTROLLER:
  @vehicles = Vehicle.find_all_active

VIEW:
  <%= vehicle.deliveries.length %>
(Continue reading)


Gmane