title: Form_for "First argument in form cannot contain nil or be empty" error
body: <p>I cannot figure out why I'm getting this error, and exactly what it means.</p>
  <blockquote>
  <p>First argument in form cannot contain nil or be empty(Line 3)</p>
  </blockquote>
  <h3>Add a new Post</h3>
  <pre><code>&lt;%= form_for @post do |f| %&gt;  //Error here
  &lt;p&gt;
      &lt;%= f.label :title, 'Title' %&gt;&lt;br/&gt;
      &lt;%= f.text_field :title %&gt;&lt;br/&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :content, 'Content'%&gt;&lt;br/&gt;
      &lt;%= f.text_area :content %&gt;&lt;br/&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.submit &quot;Add a New Post&quot; %&gt;
  &lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  <p>Controller:</p>
  <pre><code>class PostsController &lt; ApplicationController
      def index
          @posts = Post.all
      end
  
      def show
          @post = Post.find(params[:id])
      end
  
      def new
          @post = Post.new
      end
  
      def create
          @post = post.new(params[:post])
  
          if @post.save
              redirect_to posts_path,  :notice =&gt; &quot;Your post was saved&quot;
          else
              render &quot;new&quot;
          end
      end
  
      def edit
  
      end
  
      def update
  
      end
  
      def destroy
  
      end
  end
  </code></pre>