grz01-Li4Q92Sp6+I@public.gmane.org
2008-Feb-09  03:24 UTC
Where is create_table method defined?
Hi
When scaffolding a model with Rails, you will get a migration file,
say 001_create_items.rb
that looks something like this:
class CreateItems < ActiveRecord::Migration
  def self.up
    create_table :items do |t|
      ...
    end
  end
  def self.down
    drop_table :items
  end
end
My question is: Where is this method ''create_table'' defined in
Rails?
I was expecting to find it in the superclass ActiveRecord::Migration
which I think is defined in file .../lib/active_record/migration.rb
But I cannot find it there.
Anyone has a clue?
TIA
------------- grz01
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---