Menu

Archive for September 2007

This is an overview of all the articles I wrote in September 2007. Most of it is relevant to this day.

By default it’s not possible to use a database-column called type for anything else than single table inheritance. To change this, simply use set_inheritance_column() and read_attribute():

class TypeTest < ActiveRecord::Base
  set_inheritance_column(:something_else)

  def type
    read_attribute(:type)
  end

  def type=(value)
    write_attribute(:type, value)
  end
end
Read more