Displaying 1 result from an estimated 1 matches for "createvehicl".
Did you mean:
createvehicles
2009 Oct 24
1
Inheritance Problem
Hello.
I have a question to inheritance in Rails(2.3.4).
I have this three models.
class Vehicle < ActiveRecord::Base
end
class Car < Vehicle
end
class RallyCar < Car
end
And this Migration:
class CreateVehicles < ActiveRecord::Migration
def self.up
create_table :vehicles do |t|
t.string :name
t.string :brand
t.string :type
t.timestamps
end
Vehicle.create(:name =>''Demo Vehicle'', :brand => ''unknown'')
Vehicle.create(:n...