title: Rails, including relationships in json render
body: <p>I have the following code which returns a json with some data that includes @admin_user.companies:</p>
  
  <pre><code>@admin_user = User.find_by_email(email)
  
  render :json=&gt;{:status=&gt;{:code=&gt;200,:token=&gt;@admin_user.authentication_token,
      :user=&gt; @admin_user,
      :companies =&gt; @admin_user.companies }}  
  </code></pre>
  
  <p>Each company also have many "locations". How do I include all the locations for every single company in @admin_user.companies in the json?</p>