新手问题 跪求哥哥姐姐们给小弟完整的解释一下这段代码的意思

Sunnyroger · July 02, 2012 · Last by Sunnyroger replied at July 03, 2012 · 2825 hits
01class CreateProducts < ActiveRecord::Migration
02 def change
03    create_table :products do |t|
04      t.string :title
05      t.text :descripttion
06      t.string :image_url
07      t.timestamps
    end
  end
end

小弟不理解 03 行的 create_table 以及他后面:product 是什么意思? ruby 中一个方法的后面接一个:--是什么意思啊?

问题很白痴,求大神帮助啊 谢谢哈!!

You need to Sign in before reply, if you don't have an account, please Sign up first.