Displaying 1 result from an estimated 1 matches for "createblah".
Did you mean:
createblahs
2009 Oct 13
2
Single Table Inheritance (STI) Broken: NameError
...NameError: uninitialized constant when accessing a
child models that inherits form the parent model. However, if I access
the parent model first, then the child model is resolved.
What am I doing wrong? My steps are below...
Thanks,
Francis.
> ./script/generate model Blah type:string
class CreateBlahs < ActiveRecord::Migration
def self.up
create_table :blahs do |t|
t.string :type
t.timestamps
end
end
def self.down
drop_table :blahs
end
end
> rake db:migrate
== CreateBlahs: migrating
====================================================
-- create_table(:...