title: Rails 4 should I set the instance variables or chain on the methods?
body: <p>I am on Rails 4 and have a very simple question. </p>
  
  <p>Say you have a <code>User</code> model which <code>has_one</code> <code>Account</code> and <code>Account</code> <code>belongs_to</code> the <code>User</code></p>
  
  <p>On the user show page, I would like to display user attributes as well as account attributes. </p>
  
  <p>In the users_controller I could do it like this:</p>
  
  <pre><code>def show
    @user    = User.find(params[:id])
    @account = @user.account
  end
  </code></pre>
  
  <p>and then in the view:</p>
  
  <pre><code>&lt;%= @user.name %&gt; 
  &lt;%= @account.id %&gt;
  </code></pre>
  
  <p><strong>OR</strong></p>
  
  <p>I could just set the user instance variable:</p>
  
  <pre><code>def show
    @user = User.find(params[:id])
  end
  </code></pre>
  
  <p>and in the view:</p>
  
  <pre><code>&lt;%= @user.name %&gt;
  &lt;%= @user.account.id %&gt;
  </code></pre>
  
  <p>Is there a difference in these? Is one of them the 'Rails Way'? I may be over thinking this, but am just curious as to what is correct here. </p>