title: No route matches [GET] "/posts/new"
body: <p>I am completely new to ruby, andI am following <a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow noreferrer">this ruby rails tutorial</a> step by step, except for the detail that I've called my app "cinema".  </p>
  
  <p>I created a resource named "posts", there is a controller class called posts controller. From the page posts/new I should post a text with title, and execute an action (show). I am trying to add the show action in the routes file and in the controller class.  </p>
  
  <p>The show action should be called when a form is submitted, the form includes a title and a text field, mapped into the database.  </p>
  
  <p>In <a href="http://guides.rubyonrails.org/getting_started.html#showing-posts" rel="nofollow noreferrer">paragraph 5.7</a>, there is a non-clear instruction: it says to add this line:  </p>
  
  <pre><code>post GET    /posts/:id(.:format)      posts#show
  </code></pre>
  
  <p>To my <code>routes.rb</code> file, but it doesn't say where to write it exactly, I put it under <code>resources:posts</code> (maybe it's the wrong place, it doesn't saying anything about that).  </p>
  
  <p>I also added the show method to the controller class:  </p>
  
  <pre><code>def show
      @post = Post.find(params[:id])
  end
  private
      def post_params
          params.require(:post).permit(:title,:test);
      end
  </code></pre>
  
  <p>But when I submit the form I still get this error:  </p>
  
  <p><img src="https://i.stack.imgur.com/l6MYq.png" alt="enter image description here"></p>
  
  <p>The <code>rake routes</code> command result:    </p>
  
  <blockquote>
    <p>Prefix Verb   URI Pattern               Controller#Action<br>
    welcome_index GET    /welcome/index(.:format)  welcome#index<br>
            root GET    /                         welcome#index<br>
           posts GET    /posts(.:format)          posts#index<br>
                 POST   /posts(.:format)          posts#create<br>
        new_post GET    /posts/new(.:format)      posts#new<br>
       edit_post GET    /posts/:id/edit(.:format) posts#edit<br>
            post GET    /posts/:id(.:format)      posts#show<br>
                 PATCH  /posts/:id(.:format)      posts#update<br>
                 PUT    /posts/:id(.:format)      posts#update<br>
                 DELETE /posts/:id(.:format)      posts#destroy  </p>
  </blockquote>