Your find_by_sql call is going to return an array of Keyword objects.

Each object has an "attributes" hash that contains the attributes.

You can check the keys for that hash and it should tell you which attribute 
names are available.

For example:

posts = Post.find_by_sql("select title, active from posts")
posts[0].attributes.keys
 => ["active", "title"]

-- 
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.

Reply via email to