title: undefined method `permit' for nil:NilClass in Rails Guide Section 5.7
body: <p>Working on the Rails Guide Creating a Blog and am stuck at 5.7: Showing Posts.</p>
  
  <p>I have already consulted with this answer:<a href="https://stackoverflow.com/questions/17464370/nomethoderror-on-section-5-7-of-rails-guide">NoMethodError on section 5.7 of Rails Guide</a>, and it solved a different problem for me, but now I am stuck here.  It's telling me I never defined the method permit, which I understand, and don't see it defined anywhere, but the guide never had me define it or referenced it needing to be defined.  From playing with it and getting some errors back, I gather it is necessary to actually store the post data?</p>
  
  <p>I can get to the point where I submit a post, but when I submit, all I get back is:</p>
  
  <pre><code>NoMethodError in PostsController#create
  
  undefined method `permit' for nil:NilClass
  </code></pre>
  
  <p>The error message specifies the error occurs in the second line of this code:</p>
  
  <pre><code>  def create    
      @post = Post.new(params[:post].permit(:title, :text))
  
      @post.save
      redirect_to @post
  </code></pre>
  
  <p>My posts_controller file looks like this:</p>
  
  <pre><code>class PostsController &lt; ApplicationController
    def new
    end
  
    def create
      @post = Post.new(params[:post].permit(:title, :text))
  
      @post.save
      redirect_to @post
    end
  
  def show
    @post = Post.find(params[:id])
  end
  
    private
      def post_params
        params.require(:post).permit(:title, :text)
      end           
  end
  </code></pre>
  
  <p>When I remove <code>.permit(:title, :text)</code> from the create method (as suggested here: <a href="https://stackoverflow.com/questions/16883993/cant-create-new-post">Can&#39;t create new post</a>), I no longer get an error, but am just served a page that reads:</p>
  
  <pre><code>Title:
  
  Text:
  </code></pre>
  
  <p>Even though I submitted text.</p>
  
  <p>Please let me know if I need to post more info or if I should have found a fix easily, first time poster, brand new to Rails.</p>