title: Rails User ID in an associated model, why can't I call the User's information?
body: <p>I have a meetings table that has a requester_id and requestee_id which are both user ids (using devise).</p>
  
  <pre><code>create_table "meetings", force: :cascade do |t|
   t.integer  "requestor_id"
   t.integer  "requestee_id"
   t.datetime "meeting_time"
   t.boolean  "accepted"
   t.datetime "created_at",   null: false
   t.datetime "updated_at",   null: false
  end
  </code></pre>
  
  <p>When calling the requestor_id.first_name:</p>
  
  <p>View</p>
  
  <pre><code>&lt;tbody&gt;
   &lt;% @meetings.each do |meeting| %&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;%= meeting.requestor_id %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= @requestor.first_name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= meeting.requestee_id %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= meeting.meeting_time %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= meeting.accepted %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Show', meeting %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Edit', edit_meeting_path(meeting) %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Destroy', meeting, method: :delete, data: { confirm: 'Are you sure?' } %&gt;&lt;/td&gt;
    &lt;/tr&gt;
   &lt;% end %&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code> def show
    @requestor = User.find(params[:requestor_id])
   end
  </code></pre>
  
  <p>It says undefined method `first_name' for nil:NilClass</p>
  
  <p>I'm not sure if this has any relevance, but when I rake routes, none of the meetings have a path for some reason. It just says:</p>
  
  <pre><code>PUT    /languages_users/:id(.:format)               languages_users#update
  DELETE /languages_users/:id(.:format)               languages_users#destroy
  GET    /meetings(.:format)                          meetings#index
  POST   /meetings(.:format)                          meetings#create
  GET    /meetings/new(.:format)                      meetings#new
  GET    /meetings/:id/edit(.:format)                 meetings#edit
  GET    /meetings/:id(.:format)                      meetings#show
  PATCH  /meetings/:id(.:format)                      meetings#update
  PUT    /meetings/:id(.:format)                      meetings#update
  DELETE /meetings/:id(.:format)                      meetings#destroy
  </code></pre>
  
  <p>some of my config/routes.rb</p>
  
  <pre><code>  Rails.application.routes.draw do
     resources :meetings
     resources :meetings
  
     devise_for :users
  
     root 'welcome#index'
    end
  </code></pre>
  
  <p>app/model/meetings.rb</p>
  
  <pre><code>  class Meeting &lt; ActiveRecord::Base
     has_many :users
    end
  </code></pre>
  
  <p>How can I call the User table, with the integer in the requestor_id, and requestee_id. As well, conceptually what am I missing or not understanding here?</p>
  
  <p>Thanks in advance!</p>