title: Cannot pass through params using select_for on a rails app
body: <p>I'm trying to create users using a form, and inside the form I have some select_for tags. </p>
  
  <p>The error I'm getting is the following:  param is missing or the value is empty: shifter</p>
  
  <p>I don't understand why this is the case, as all parameters are appearing when I do a binding.pry print</p>
  
  <pre><code>[1] pry(#&lt;ShiftersController&gt;)&gt; params
  =&gt; {"utf8"=&gt;"✓",
   "authenticity_token"=&gt;"1lilvIvZQeKawJDKHVhGzuerAOhQyxCz2kC6/MncWgiJz3lhFvOvt+N3XEc37kf7bhW1OIVG4IKdl26xvtXKKA==",
   "name"=&gt;"Alex",
   "surname"=&gt;"Swiec",
   "email"=&gt;"alex@alexswiec.com",
   "password"=&gt;"password",
   "batch_id"=&gt;"1",
   "accesslevel_id"=&gt;"2",
   "alumni"=&gt;"false",
   "commit"=&gt;"Create New Profile",
   "controller"=&gt;"shifters",
   "action"=&gt;"create"}
  </code></pre>
  
  <p>The controller I have is the following one</p>
  
  <p>{</p>
  
  <pre><code>class ShiftersController &lt; ApplicationController
  
      before_action :check_logged_in  # check_logged_in is in the applications controller 
      before_action :set_shifter, only: [:edit, :update, :show]
      before_action :require_same_user, only: [:edit, :update]
  
      def new
          @shifter = Shifter.new
      end 
  
      def create
          binding.pry 
          @shifter = Shifter.new(shifter_params)
  
          @intakeprofile = @shifter.intakeprofile
          if @shifter.save &amp; @intakeprofile.save
              flash[:success] = "New Shifter created successfuly"
              redirect_to shift_projects_path
          else
              render 'new'
          end
  
      end 
  
      def edit 
          #before edit we call set_shifter to know which shifter to select
      end 
  
      def update
          #before update we call set_shifter to know which shifter to select
          if @shifter.update(shifter_params)
              flash[:success] = "Your profile has been update"
              redirect_to shifter_path(@shifter)
          else 
              render 'edit'
          end 
      end 
  
      def show
          #before show we call set_shifter to know which shifter to select
      end 
  
  
      def index 
          @shifters = Shifter.all.order("created_at DESC")
          @batches = Batch.all
      end 
  
      private 
  
          def shifter_params
              params.require(:shifter).permit(:name, :surname, :email, :password, :batch_id, :accesslevel_id, :alumni )
          end
  
          def set_shifter 
              @shifter = Shifter.find(params[:id])
          end 
  
  
          def require_same_user 
              if current_user != @shifter
                  flash[:danger] = "You can only edit your own profile"
                  redirect_to root_path
              end 
      end
  end 
  </code></pre>
  
  <p>}</p>
  
  <p>And the view is the following one: </p>
  
  <p>{</p>
  
  <pre><code>&lt;%= render 'shared/errors', obj: @shifter %&gt;
  
  &lt;div class="row"&gt;
      &lt;div class="well col-md-6 col-md-offset-3"&gt;
          &lt;%= form_tag '/shifters/#{@shifter.id}/edit' do %&gt;
  
          &lt;%= label_tag :name %&gt;
          &lt;%= text_field_tag :name %&gt;
  
          &lt;%= label_tag :surname %&gt;
          &lt;%= text_field_tag :surname %&gt;
  
  
          &lt;%= label_tag :email %&gt;
          &lt;%= text_field_tag :email %&gt;
  
          &lt;%= label_tag :password %&gt;
          &lt;%= password_field_tag :password %&gt;
  
          &lt;%= label_tag :batch_id %&gt;
          &lt;%= select_tag :batch_id, options_for_select([['November 2013', 1], 
                                                        ['February 2014', 2], 
                                                        ['June 2014', 3],
                                                        ['October 2014', 4],
                                                        ['February 2015', 5],
                                                        ['June 2015', 6],
                                                        ['October 2015', 7],
                                                        ['February 2016', 8],                                                  
                                                        ['June 2016', 9],                                           
                                                        ['October 2016', 10],                                                   
                                                        ['February 2017', 11],
                                                        ['June 2017', 12]                                                   
                                                        ])  %&gt;
  
  
          &lt;%= label_tag :access_level_id %&gt;
          &lt;%= select_tag 'accesslevel_id', options_for_select([ ['Shifter', 2], ['Coach', 3], ['Admin', 1]])  %&gt;
  
  
          &lt;%= label_tag :alumni %&gt;
          &lt;%= select_tag 'alumni', options_for_select([['Yes', false], ['No', false]])  %&gt;
  
  
  &lt;br&gt;&lt;br&gt;
  
  
          &lt;%= submit_tag(@shifter.new_record? ? 'Create New Profile' : 'Update Profile', class: "btn btn-success") %&gt;
  
          &lt;% end %&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>}</p>