使用 rails g scaffold Users 时,rails为我们建立migrate, model,controller, helper, view, test and assets
当使用models时,产生的是 migrate, model and test/unit file
其他的:
the difference is:
if you want to create the model, controller and view for a new resource, scaffold is the tool for this job.
$model just create models dynamically.
scaffold是一个脚本,可以直接创建model、controller、views等相关的文件,直接访问。model只是创建一个model,即继承activerecord的一个子类。