Displaying 2 results from an estimated 2 matches for "howtousejoinswithfindall".
2005 Apr 20
4
Error in tutorial or sintax changed?
Hi,
In this tutorial
http://wiki.rubyonrails.com/rails/show/HowtoUseJoinsWithFindAll
it sad:
sql =<<SQL
SELECT articles.*, authors.name AS author_name
FROM articles
LEFT JOIN authors ON author_id = authors.id
SQL
and this return
*app/controllers/media_controller.rb:366: can''t find string "SQL"
anywhere before EOF*
what is wrong? the tutorial or ruby cha...
2006 Mar 02
0
ActiveRecord View subclass? -- Helper table lookups
Hi,
I''ve read the rails book and wiki entries such as
http://wiki.rubyonrails.org/rails/pages/HowtoUseJoinsWithFindAll
As far as I can tell, the recommended way to display the author''s name
for a db of posts / authors is to use :include and then use
post.author.full_name to see the full_name column.
But:
a) all columns of author are pulled down
b) Not clear to me how you''d cleanly iterate thro...