[Nitro] Error Handling and Reloading

Arne Brasseur arne at arnebrasseur.net
Sun Dec 16 04:52:18 EST 2007


Arne Brasseur schreef:
> def handle_form
>   if (something_not_ok)
>     flash_error "something's not ok"
>     flash[:form_data] = %w(text bla bar).map {|w| request[w]}
>   
That  should be

flash[:form_data] ||= {}
%w(text bla bar).map {|w| flash[:form_data][w] = request[w]}

(ab)

-- 
Ein Fuchs muß tun, was ein Fuchs tun muß
arne at arnebrasseur.net




More information about the Nitro-general mailing list