title: Ruby on Rails error - NoMethodError in Statuses#new
body: <p>I get this error <strong>NoMethodError in Statuses#new</strong> when I try to view a page in my app after I add the form field... I'm new to ruby on rails so am keen to be able to fully understand this...</p>
  
  <pre><code>&lt;%= f.input :user_id %&gt;
  </code></pre>
  
  <p>Here is the full error message:</p>
  
  <pre><code>NoMethodError in Statuses#new
  
  Showing /Users/danlee/Projects/treebook/app/views/statuses/_form.html.erb where line #14 raised:
  
  undefined method `user_id' for #&lt;Status:0x007feb53cdd138&gt;
  Extracted source (around line #14):
  
  11:     &lt;/div&gt;
  12:   &lt;% end %&gt;
  13: 
  14:   &lt;%= f.input :user_id %&gt;
  15:   &lt;%= f.input :content %&gt;
  16:   &lt;div class="form-actions"&gt;
  17:     &lt;%= f.button :submit %&gt;
  Trace of template inclusion: app/views/statuses/new.html.erb
  
  Rails.root: /Users/danlee/Projects/treebook
  
  Application Trace | Framework Trace | Full Trace
  app/views/statuses/_form.html.erb:14:in `block in _app_views_statuses__form_html_erb__4012047659275744874_70324335923840'
  app/views/statuses/_form.html.erb:1:in `_app_views_statuses__form_html_erb__4012047659275744874_70324335923840'
  app/views/statuses/new.html.erb:3:in `_app_views_statuses_new_html_erb___64465850179705865_70324349236340'
  app/controllers/statuses_controller.rb:29:in `new'
  Request
  
  Parameters:
  
  None
  Show session dump
  
  Show env dump
  
  Response
  
  Headers:
  
  None
  </code></pre>
  
  <p>Github repository for the app is here too: <a href="https://github.com/pixeljugglerdan/treebook" rel="nofollow">https://github.com/pixeljugglerdan/treebook</a></p>