vendredi 27 février 2015

Boolean Outputs

This is a rookie question, I know - but I'm struggling to find an answer elsewhere. I've written a little app that has several checkbox fields. All I need to do is have an "X" appear by Yes or No in my form. I'm attempting to use the 'if' function and have written this:


<%= if @pc.part_a '1' then 'X' %><% end %>


But it's not working. I know this is foolishly simple, but I'm hoping someone can show me what I'm doing wrong.





Aucun commentaire:

Enregistrer un commentaire