> text @prints[i].empfaenger.name + > (@prints[i].empfaenger.company.blank? ? > "" : @prints[i].empfaenger.company + "\n") + ... > > The major advantage of blank? is that it will trap both nil values and > empty > strings and also is more readable (the nil values could easily come from > a NULL > in the database, or missing key in a params[] parameter list). > > HTH, > > Peter
Thx Peter. Funny, English speaking guy is answering German questions! =) -- Posted via http://www.ruby-forum.com/. _______________________________________________ rubyonrails-ug mailing list [email protected] http://mailman.headflash.com/listinfo/rubyonrails-ug
