I am new to ROR, and I’m stuck!
My MySQL tables are setup like this:
my regular PHP/SQL query would look something like this:
$all_books = SELECT * FROM books LEFT JOIN authors ON
so, i create this ruby call of the same query:
@all_books = Book.find( :all, :include => [:author] )
now, in PHP, i could just call
$all_books[‘book_name’] or $all_books[‘author_name’] and both would work
in rail, i seem to have an issue where i can call @all_books.book_name
just fine, but @all_books.author_name gives me an error
however, when i run @all_books.inspect, i can see the author_name in the
data that it spits back to me. how do i get to that data?