5.6 Saving Data in the Controller

Back in posts_controller, we need to change the create action to use the
new Post model to save the data in the database. Open
app/controllers/posts_controller.rb and change the create action to look
like this:

def create
  @post = Post.new(params[:post])
  @post.save
  redirect_to @post
end