title: Method Defined in Controller Throwing NoMethodError
body: <p>My application has <code>Dwellings</code> and <code>Roomies</code>. I am building some authentication into the <code>Dwelling</code> view - only <code>users</code> who are <code>roomies</code> of the current <code>dwelling</code> should be able to view certain data - all other users will see a different view.</p>
  
  <p>To enable this, I have created an <code>is_roomie?</code> method in the <code>Users Controller</code>. The method looks like this:</p>
  
  <pre><code>## is_roomie? method in Users_Controller.rb ##
  
  def is_roomie?
  roomie_ids = []
  @dwelling.roomies.each do |r|
    roomies_ids &lt;&lt; r.id
  end
  roomie_ids.include?(current_user.id)
  end 
  </code></pre>
  
  <p>I call this method in the <code>Dwelling</code> view as follows:</p>
  
  <pre><code>## show.html.erb (Dwelling) ##
  ....
  &lt;% if current_user &amp;&amp; current_user.is_roomie? %&gt;
  ....
  </code></pre>
  
  <p>When I loaded the page after implementing this, I get the following NoMethoderror:</p>
  
  <blockquote>
    <p>NoMethodError in Dwellings#show</p>
    
    <p>Showing >/Volumes/UserData/Users/jraczak/Desktop/Everything/rails_projects/Roomie/roomie/app/views/dwellings/show.html.erb where line #5 raised:</p>
    
    <p>undefined method `is_roomie?' for #User:0x00000102db4608></p>
  </blockquote>
  
  <p>For some background, I did try this as a <code>Dwelling</code> method and moved this into the <code>User</code> model to no avail. Thanks in advance for any and all insight!</p>