Hello,
I am a newbie so anyones help is appreciated.
I notice that in a few lessons (example 3.3 --> Add email field to the
users table)
we just create a migration with these args 'AddEmailField
email:string'
This migrations generates this ruby code
class AddEmailField < ActiveRecord::Migration
def self.up
add_column :users, :email, :string
end
def self.down
remove_column :users, :email
end
end
My questions is how does the migration know what model to use. How did
':users' magically appear in add_column :users, :email, :string
Thanks
Ali
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---