From: Paul Mckibbin Date: 2008-03-21T13:07:34+09:00 Subject: Re: if-less if statements > On Thu, 20 Mar 2008 09:01:48 -0500 >> 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, Why not use a regular expression? They're fairly straightforward when you control the strings to this extent. <%= in_place_editor_field 'user','w_phone',{ :style => (@user.w_phone=~/Click to edit|Check format/) ? 'color:red;' : ''}, :cols=>20%> should do what you want regardless if there are extra spaces or not. -- Posted via http://www.ruby-forum.com/.