I had a situation where I wanted to use a <%= %> (scriptlet) in my
text_field call to set the “disabled” attribute on the text field, like
<%= text_field(:current_job, ‘removeLinkPos’, :value => ‘’, :id =>
‘offset’, :maxlength => 2, :disabled => <%= sometest ? ‘true’ : ‘false’
however, this caused a compile error.
I ended up with an if/else statement to generate my text_field
differently based on the boolean test for “disabledness”.
It kind of makes sense to me that doing <%= … <%= … %> …%> might
However, is there an alternative way to achieve this behavior, when you
want to use <%= %> to generate dynamic attributes within the call to a