From: Cliff Kachinske Date: 2011-01-07T13:22:17+09:00 Subject: Re: Block variable - How is it read in English? If you are running OSX/*n*x you can learn more by opening a terminal session and issuing this: ri ActiveRecord::Migration It will pull up a very helpful document. I don't recall if ri is bundled with the distribution for Ruby < 1.9. But if you are following the rails tutorial, you already know how to use gems to install it. SW Engineer wrote in post #972878: > Following the "Ruby on Rails Tutorial", and under section "6.1.1 > Database migrations" > http://railstutorial.org/chapters/modeling-and-viewing-users-one#top > > There is the following migration: > > class CreateUsers < ActiveRecord::Migration > def self.up > create_table :users do |t| > t.string :name > t.string :email > . > . > . > > How do we read this line in English? > > create_table :users do |t| > > Why should we write the following line with "t."? > > t.string :name > > I know that block variables are used to pass parameters, but what is it > trying to tell us here? > > So the "do |t|" part is actually the part that is confusing me. > > Any clarifications would be appreciated. > > Thanks. -- Posted via http://www.ruby-forum.com/.