over 2 years ago

generate和destroy是相反

rails generate controller FooBars baz quux
rails destroy controller FooBars baz quux
rails generate model Foo bar:string baz:integer
rails destroy model Foo

migrate和rollback相反

rake db:migrate
rake db:rollback

回到初始狀態

rake db:migrate VERSION=0
← Sublime Text 2 + Emmet外掛 [gem] 實現投票功能,acts_as_votable →
 
comments powered by Disqus