title: how to display associated models in views in ruby on rails
body: <p>This is probably a n00b question. I have CitiesUser model:</p>
  
  <p><code>class CitiesUser &lt; ActiveRecord::Base {
      belongs_to :city
      belongs_to :user
  }</code></p>
  
  <p>In the controller I do this:</p>
  
  <p><code>def index      {
      @cities_users = CitiesUser.find(:all,
              :conditions =&gt; { :user_id =&gt; session[:user][:id] },
              :include =&gt; [:city])</code></p>
  
  <p>and in the view this:</p>
  
  <p><code>&lt;%= @cities_users.inspect %&gt;</code></p>
  
  <p>Now, I don't see associated model City anywhere. How do I iterate in my view over Cities that are attached to CitiesUser?</p>
  
  <p>My WEBRick says:</p>
  
  <p><code>CitiesUser Load (0.6ms)  SELECT "cities_users".* FROM "cities_users" WHERE "cities_users"."user_id" = 1</code></p>
  
  <p><code>City Load (0.8ms)  SELECT "cities".* FROM "cities" WHERE ("cities"."id" IN (5,3))</code></p>
  
  <p>So the association is being loaded, right? Which variable is it stored in, or how to I put it inside my CitiesUser?</p>