From: Ryan Leavengood Date: 2007-04-04T23:29:36+09:00 Subject: Re: Problem Extracting Array Values On 4/4/07, ChrisH wrote: > > As you say, its stored as a String, and String defines [] to return > the ASCII value of the character > at the given index. If you put 91.chr into IRB you'll see it is the > '[' character. > > You need to convert your String into an actual array before you can > access each element. > > Maybe: > eval(@blocks)[0] That is what I surmised as well. But in general it is a bad idea to be evaling code from a database. Security and all that. Dustin, why are you storing those values that way? Why not have a normalized table with a row for each? In other words you create a blocks table, define a Block model which belongs_to whatever model you currently use the blocks column in, and then that model will have many blocks. Then you could just do @model.blocks.each do |block| in your view. Ryan