title: Why does rails redirect to the show action after creating?
body: <p>New web developer here, and I think I may be missing some very fundamental knowledge.
  Given the code</p>
  
  <pre><code>def create
          @post = Post.new(post_params)
          if @post.save
              redirect_to @post
          else
              render "new"
          end
  end
  </code></pre>
  
  <p>why does the view templates redirect to the <strong>def show</strong> action? If I do not define a <strong>def show</strong> and its corresponding views, rails will throw me an error. </p>
  
  <p>I am just not understanding why even though the code is <strong>redirect_to @post</strong> after I save a post, it appears to be redirecting to the show page after creating a post. Is this just one of those rails thing that I should just take it as it is or am I missing some fundamental HTML protocol knowledge (which I honestly don't know a lot about)? </p>
  
  <p>Edit: To further clarify my question, I see that <strong>@post</strong> is already defined in the <strong>create</strong> method and is defined as <strong>Post.new(post_params).</strong> when I <strong>redirect_to @post</strong>, wouldn't it simply call that line again?</p>