code_junkie

Rails JOIN TABLES

Nov 12th, 2011
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. @articles = Article.find(:all, :conditions => "…", :include => :user)
  2.  
  3. <ul>
  4. <% for each article in @articles do %>
  5. <li><%= article.user.zipcode %></li>
  6. </ul>
  7. <% end %>
Add Comment
Please, Sign In to add comment