David Vallner
1/12/2006 7:41:00 PM
On Thu, 12 Jan 2006 16:58:04 +0100, Depili <vpalmu@aski.hut.fi> wrote:
> I can access the data with the :Data keys, but question remains, when I
> have keys :1..:10 for example, how do I access them in a loop?
>
>
Hmm, this still seems strange, AFAIK, Rails sanitizes form input. Are you
sure you aren't circumventing what the Rails framework provides? A more
concise approach would be to let ActiveRecord do its magic if possible.
Anyhoo, you can still iterate over the data if for some strange reason the
request parameter parser uses symbols like that as keys, e.g.:
for i in (1..10)
do_stuff_with(params[:Data][i.to_s.to_sym])
end
Anyways, more context wouldn't hurt, but if the above does the trick, fine
as well.
David Vallner