As an unrelated, but hopefully helpful aside, I'd also recommend not duplicating your markup in both the "if" and "else" sections. Doing things this way quickly gets hard to read and maintain. Better might be:
<% if (article.gender == "Male") then color = '#d1e1fa' else color = '#111111' end %> <table style="background-color: <%= color %>"> This way you only have to write your table markup once and the conditional part is clearly called out. When you later on decide to add an attribute to your table or replace tables with CSS, or whatever, you have much less work to do. Completely optional, but the more you follow this kind of practice, the easier and faster you'll keep things running later. I only mention this because I've seen extreme examples where people copy and paste huge chunks of template across if/else conditions just to change one or at most a handful of properties. Madness! :) HTH jsw -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.