Is test_rand_variable
a column in your database?
If not you want to use attr_accessor:
instead, that will allow the variable to be passed through as follows:
<%= form_tag({controller: "subjects", action: "randomize"}, method: "post") do %>
<div class="span6 offset3 center">
<div>
Enter Group Size:
<%= select_tag "select_rand_variable",
[['',nil],
["6",6],
["7",7],
["8",8],
["9",9],
["10",10]] %>
This should then be passed to the controller as params[:select_rand_variable]
Hope this helps, it's been a while since I played around with form_tags