1.controller
无namespace的:class XxxsController < ApplicationController
有namespace的:class Xxx::XxxsController < ApplicationController
namespace名称::controller名称
2.model
class Xxx < ActiveRecord::Base
end
3.migrate文件中添加
t.字符类型 :字段名,comment: ‘备注’
t.timestamps