thanks fred but in o/p
when we use find method and print that object it shows like that [#, #, #, #] but when i modify same array with some operations i got array like this [{"1"=>"75225", "2"=>"Sat"},{"1"=>"75225", "2"=>"Sat"}] now can I convert this as like above like active record type of array ? Frederick Cheung wrote: > On Feb 21, 11:00�am, Cyrus Dev <rails-mailing-l...@andreas-s.net> > wrote: >> which contains array of hashes >> >> when we write simple find method of any tables it returns >> >> [#, #, #, #] in this way > > Sounds like your view just contains <%= some_array %> > > Which means that you'll just get the result of calling to_s on each of > your array elements, which is unlikely to be useful and also invalid > html since what it outputs is something like #<SomeObject: > 0x12345678> . It is up to you to produce some meaningful textual > output for your array elements (eg <%= h some_array.inspect %> but > even that is pretty crude) > > Fred -- 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---