title: instance variable vs. symbol in ruby on rails (form_for)
body: <p>i'm new to ruby on rails and am working with version 2.3 on mac osx.
  i am trying to create the same functionality a scaffold creates, but on my own.
  i created a "post" controller, view, and model.
  in post controller, i have the following:</p>
  
  <pre><code>class PostController &lt; ApplicationController
    def index
    end
  
    def new
      @post = Post.new
    end
  end
  </code></pre>
  
  <p>in new.html.erb, i have the following:</p>
  
  <pre><code>&lt;h1&gt;New Post&lt;/h1&gt;
  
  &lt;% form_for :post do |f| %&gt;
  
      &lt;%= f.text_field :title %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>i noticed that in the scaffold generated code, the use the instance variable @post for the form_for helper. why do they use the instance variable in the scaffold generated form if passing the symbol :post in form_for does the exact same thing, while a symbol requires changing the config of the routes?</p>
  
  <p>thank you very much,
  yuval</p>