点击 【Destroy】 后会根据我们的定义弹出提示


连续删除几次后所剩无几

目前已经通过 Rails 实现了文章的 新建、显示、列出、更新、删除 操作
命令汇总
rails server -b 0.0.0.0rails generate controller welcome indexcat app/views/welcome/index.html.erbvim config/routes.rbgrep -v " #" config/routes.rb | grep -v "^$"rake routesbin/rails g controller articlescat app/controllers/articles_controller.rbcat app/views/articles/new.html.erbbin/rake routescat app/controllers/articles_controller.rbbin/rails generate model Article title:string text:textcat db/migrate/20160422140912_create_articles.rbcat app/models/article.rbbin/rake db:migratecat config/database.ymlgrep -v "^#" config/database.ymlll db/development.sqlite3cat app/controllers/articles_controller.rbcat app/views/articles/index.html.erbcat app/views/articles/show.html.erbcat app/views/articles/new.html.erbcat app/models/article.rbcat app/controllers/articles_controller.rbcat app/views/articles/new.html.erbcat app/views/articles/edit.html.erbcat app/views/articles/index.html.erb
原文地址


