E
Ernst Tanaka
record => [#<Quote:0xb189218
@attributes={"underlying"=>"$ADVN", "price"=>"1579.00",
"date"=>"2007-11-08 17:01:13", "id"=>"3362", "impvolatility"=>nil,
"volume"=>nil}>,
#<Quote:0xb1877ec @attributes={"underlying"=>"$ADVN",
"price"=>"1579.00", "date"=>"2007-11-08 16:49:15", "id"=>"3351",
"impvolatility"=>nil, "volume"=>nil}>]
The above array is the result from a record.find
all) sql call in Ruby.
I need to access attribute price of the second entry of the array.
I have some problem coding it.
I tried record.price[1] but that seems not to be the solution.
Thanks for your help,
Ernst
@attributes={"underlying"=>"$ADVN", "price"=>"1579.00",
"date"=>"2007-11-08 17:01:13", "id"=>"3362", "impvolatility"=>nil,
"volume"=>nil}>,
#<Quote:0xb1877ec @attributes={"underlying"=>"$ADVN",
"price"=>"1579.00", "date"=>"2007-11-08 16:49:15", "id"=>"3351",
"impvolatility"=>nil, "volume"=>nil}>]
The above array is the result from a record.find
I need to access attribute price of the second entry of the array.
I have some problem coding it.
I tried record.price[1] but that seems not to be the solution.
Thanks for your help,
Ernst