使用rspec_scaffold 代替 scaffold_resource
rails rspec_scaffold post title:string body:text author:integer created_at:datetime updated_at:datetime
rails3: rails g rspec:install rails g scaffold
会生成:model controller helper views
spec/models/post_spec.rb
rspec 到需要到rspec目录下才可以
rspec
最新推荐文章于 2020-09-23 12:53:55 发布