I should mention something else. I am on Rails 2.1.0 and even
find_by_sql does not return columns from multiple tables as the Rails
API documentation says:
This example is from Rails API docs:
# A simple SQL query spanning multiple tables
Post.find_by_sql "SELECT p.title, c.author FROM posts p, comments c
WHERE p.id = c.post_id"
> [#<Post:0x36bff9c @attributes={"title"=>"Ruby Meetup",
"first_name"=>"Quentin"}>, ...]
I followed this for my queries and I can only get columns from either of
the tables but not both.
Is this a bug?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---