On 6 sep, 21:04, Rico <richardjhar... / gmail.com> wrote:
> On Sep 6, 7:17=A0pm,Erwin<yves_duf... / mac.com> wrote:
>
> > =A0 =A0 =A0works =3D =A0Array.new
> > =A0 =A0 =A0session[:cart_works].each_pair {|key, value| works << key if
> > value =3D=3D user_id}
>
> > how to initialize the works array in the bloc ?
>
> > thanks for your lights
>
> >erwin
>
> works =3D session[:cart_works].keys.select { |key| session[:cart_works]
> [:key] =3D=3D user_id }

thanks a lot, all answers show exactly what I was looking for, ...