Object#type is deprecated; use Object#class

Thanks in advance for being patient with this rails newbie When I do the STI example in AWDWR i get a warning: Object#type is deprecated; use Object#class What does this mean? How should I change the following code?

This is from page 342 AWDWR e1/ar/sti.rb create_table :people, :force => true do |t| t.column :type, :string

Can I change this to

t.column :kind, :string with no ill effects? Or is their something special about a column with the name type?

Change :type to :person_type. That should solve your problem.

Virginian wrote:

Btw, if you change it to person_type also change the sti id to person_id. You don't have to use person, you can use anything you want, but person seems to fit your schema.

Virginian wrote: