On May 18, 8:39 pm, Kim <[email protected]> wrote: > I am trying to figure out how to use an abstract class to access > multiple databases. I can connect just fine using > establish_connections in an abstract class, and I can query the > database using find_by_sql on the abstract class. I am having problems > with then using the data returned from the query. I am looking on any > help on best practices and such.
Why are you calling find_by_sql on an abstract class ? When you try and use the computer object (by calling name etc.) rails tries to work out what it should do with attributes (eg is it a string, a date, a number) and things of that order, and to do so it examines the schema for the table it thinks the objects come from. Fred -- 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.

