From: Shandy Nantz Date: 2008-03-20T23:01:48+09:00 Subject: if-less if statements I asked this on the rails side of this forum but didn't get a response and while I am using the code in a rails app I think that this is a ruby question. In a helper that I am using, I am seeing if a phone # gets entered correctly, if not default text is entered in it's place and displayed in red. <%= in_place_editor_field 'user','w_phone',{ :style => @user.w_phone == 'Click to Edit' ? 'color:red;' : ''}, :cols=>20%> This highlets everything in that comes through with 'Click to Edit' in red. But what I would like to do is to hightlight everything in red if the string says either 'Click to Edit' of 'Check Format'. So I tried this: <%= in_place_editor_field 'user','w_phone',{ :style => @user.w_phone == 'Click to Edit' ? 'color:red;' : @user.w_phone == "Check Format " ? 'color:red;' : ''}, :cols=>20%> This codes executes fine but it doesn't show the 'Check Format' part as red, so I'm thinking that I don't have the conditions set up wrong. Anyone have any suggestions? Thanks, -S -- Posted via http://www.ruby-forum.com/.