@users.all basically returns "array" of users so you have to iterate through this array
@users.each do |user| puts user.name end tom On Jun 20, 2011, at 18:33 , Yennie wrote: > Hi all, I have very basic error that i have no idea how to show > > I have user table > id > name > add > phone number > > > then i select all in user table > using => @users = User.all > > => @users.name > > it gives me undefined method name Array<.....> > > Please give me some advice.. > > > Thanks > > -- > 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. -- =============================================================================== Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache www.meinlschmidt.com www.maxwellrender.cz www.lightgems.cz =============================================================================== -- 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.

