Rails 101 (Rails 5版) 修改已發表的文章
修改 app/controllers/posts_controller.rb
1 | - before_action :authenticate_user!, only: [:new, :create, :destroy] |
新增 app/views/posts/edit.html.erb
1 | <h2 class="text-center">編輯文章</h2> |
成果

On the way to be a programmer
修改 app/controllers/posts_controller.rb
1 | - before_action :authenticate_user!, only: [:new, :create, :destroy] |
新增 app/views/posts/edit.html.erb
1 | <h2 class="text-center">編輯文章</h2> |
成果