petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

Docs need some updating #55

Open dingus9 opened 12 years ago

dingus9 commented 12 years ago

First

Should note this requirement for rails_sql_views for sqlite3 in the User Guid after step 1

See also http://activewarehouse.rubyforge.org/rails_sql_views/

In your Gemfile add: gem 'rails_sql_views', :git => 'https://github.com/morgz/rails_sql_views.git'

In your config/environment.rb add: require 'rails_sql_views'

Second

The field field :inheritance_column_name seems to actually be :type for a citier parent class's inheritance column as seen in this example:

class CreateMedias < ActiveRecord::Migration
  def self.up
    create_table :medias do |t|
      t.string :inheritance_column_name
      t.string :name
      t.integer :price
    end
  end
  def self.down
    drop_table :medias
  end
end