title: Ruby on Rails: How to gather temporary value from form input
body: <p>I'm having trouble asking the right question I think. From my view, the form asks the user to select a number 6 - 10. Once the user submits the number, the controller uses that number to in a comparison (if/else).</p>
  
  <p>I'm having trouble finding a way to get that 6 - 10 value. So I defined a value, @test_rand_variable, in my model.</p>
  
  <pre><code>attr_accessible :test_rand_variable
  </code></pre>
  
  <p>And now I'm trying to find a way such that this would work:</p>
  
  <pre><code>&lt;%= form_tag({controller: "subjects", action: "randomize"}, method: "post") do %&gt;
      &lt;div class="span6 offset3 center"&gt;
          &lt;div&gt;
              Enter Group Size: 
              &lt;%= select @test_rand_variable,
              [['',nil],
              ["6",6],
              ["7",7],
              ["8",8],
              ["9",9],
              ["10",10]] %&gt;
  </code></pre>
  
  <p>I'm also unsure on how to access that variable, so maybe thats the reason I'm not seeing the value. Here's an example of what I'm trying:</p>
  
  <pre><code>params[@test_rand_variable] &gt;= 6
  </code></pre>
  
  <p>If anyone has some literature on this, or any help at all, I would really appreciate it.</p>