4 Aug
2009
4 Aug
'09
08:07
* Josef Reidinger <jreidinger@suse.cz> [Aug 04. 2009 10:00]:
+ region = timezones.find { |reg| reg.name == params[:region] } + region = {} unless region
This can be further shortened by writing region = (timezones.find { |reg| reg.name == params[:region] }) || {} Where I prefer region = (timezones.find { |reg| reg.name == params[:region] }) || Hash.new to make it less cryptic ;-) Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org