The short answer is that you can not disable this. The 'type' method
is a Ruby method for the class of an object. As stated by Philip you
can access the 'type' column data by directly indexing the active
record. You can also create a facade by having methods on the class
that retrieve the 'type' column using a different name as in:
The 'type' method is a Ruby method for the class of an object.
This is not a Ruby method. This is part of ActiveRecord, and is used by
Rails to manage single-table inheritance.
I'm adding a solution for future askers. This applies to Rails 3:
class ExampleModel < ActiveRecord::Base
set_inheritance_column do
'disabled'
end
end
This changes the name of the column that ActiveRecord looks for, to use
for STI. As long as you pick something that doesn't actually match any
of your column names, it has the effect of disabling inheritance
altogether.