title: undefined method `empty?' for nil:NilClass when adding a new field form
body: <p>Not sure why, but when I add this new line to my teams view I get the undefined method 'empty?' error</p>
  
  <pre><code>&lt;div class="field"&gt;
    &lt;%= f.label :field_id %&gt;&lt;br&gt;
    &lt;%= f.select :field_id, @fields, prompt: "select a field" %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here are the models for both team and field</p>
  
  <pre><code>class Team &lt; ActiveRecord::Base
    has_many :users
    belongs_to :field
  end
  
  class Field &lt; ActiveRecord::Base
    has_many :teams
  end
  </code></pre>
  
  <p>I had to migrate field_id into the teams table here is that</p>
  
  <pre><code>class AddFieldIdToTeams &lt; ActiveRecord::Migration
    def change
      add_column :teams, :field_id, :integer
    end
  end
  </code></pre>
  
  <p>As of now I can to to localhost:3000/fields and create a new field with name and location settings. It's when I go to localhost:3000/teams/new that the error occurs. I'm trying to get a dropdown menu of the fields so that when you create a team it will be associated with what field the team will be playing on. If anymore information is needed let me know. Thanks</p>
  
  <p>edit adding my fields controller</p>
  
  <pre><code>class FieldsController &lt; ApplicationController
    before_action :set_field, only: [:show, :edit, :update, :destroy]
  
    # GET /fields
    # GET /fields.json
    def index
      @fields = Field.all
    end
  
    # GET /fields/1
    # GET /fields/1.json
    def show
    end
  
    # GET /fields/new
    def new
      @field = Field.new
    end
  
    # GET /fields/1/edit
    def edit
    end
  
    # POST /fields
    # POST /fields.json
    def create
      @field = Field.new(field_params)
  
      respond_to do |format|
        if @field.save
          format.html { redirect_to @field, notice: 'Field was successfully created.' }
          format.json { render action: 'show', status: :created, location: @field }
        else
          format.html { render action: 'new' }
          format.json { render json: @field.errors, status: :unprocessable_entity }
        end
      end
    end
  
    # PATCH/PUT /fields/1
    # PATCH/PUT /fields/1.json
    def update
      respond_to do |format|
        if @field.update(field_params)
          format.html { redirect_to @field, notice: 'Field was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render action: 'edit' }
          format.json { render json: @field.errors, status: :unprocessable_entity }
        end
      end
    end
  
    # DELETE /fields/1
    # DELETE /fields/1.json
    def destroy
      @field.destroy
      respond_to do |format|
        format.html { redirect_to fields_url }
        format.json { head :no_content }
      end
    end
  
    private
      # Use callbacks to share common setup or constraints between actions.
      def set_field
        @field = Field.find(params[:id])
      end
  
      # Never trust parameters from the scary internet, only allow the white list through.
      def field_params
        params.require(:field).permit(:name, :location)
      end
  end
  </code></pre>