title: ruby on rails defining variables
body: <p>I've been trying to do this for a few hours now. I'm pretty new to Ruby and Rails.</p>
  
  <p>In a devise.html.erb file I have</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;%= render :partial =&gt; 'layouts/header' if user_signed_in? %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The above works fine. If the user has signed in, then they get to see the header at the top of my page,
  if they're not signed in, they don't see it.</p>
  
  <p>But I need to have (because the user has to put in an address on the next page):</p>
  
  <pre><code> &lt;div class="container"&gt;
  &lt;%= render :partial =&gt; 'layouts/header' if current_user.registration_complete?  %&gt;
  </code></pre>
  
  <p></p>
  
  <p>And when I restart my app I get the error message:</p>
  
  <pre><code>NoMethodError in Devise/registrations#new
  </code></pre>
  
  <p>I have registration_complete defined elsewhere in my project, in user.rb (which other parts of my project have no trouble recognising) as:</p>
  
  <pre><code>#Determines whether user completed his profile on registration or not
   def registration_complete?
  self.address.present?
   end
  </code></pre>
  
  <p>Is there somewhere else I should put this code, so it will be recognised in my devise.html.erb?</p>