From: Daniel Waite Date: 2007-10-26T06:20:54+09:00 Subject: Re: Problem with attribute name unknown wrote: > Hi, i'm new at ruby on rails and i have this little problem. I have a > table named "translations". Translations has "id", "message" and > "description" as attributes. When i try to get information from > "translations" i write > > aux1 = Translation.find_by_id(1).description > > and no problem with that, but when i write this > > aux2= Translation.find_by_id(1).message > > it return something like #Message:0x4851f70 > > i've tried with Translation.find_by_id(1)."message" or > Translation.find_by_id(1).'message' but nothing works. Any idea how > should i rescue the value??. I can't rename the attribute on data > base :( Did you design the model? When you see something like Message:0x4851f70, that's usually an instance of a class. Are you using aggregate objects for that model? http://api.rubyonrails.org/classes/ActiveRecord/Aggregations/ClassMethods.html -- Posted via http://www.ruby-forum.com/.