title: Conditionally show fields on Ruby on Rails form
body: <p>I have a Ruby on Rails app using Bootstrap for styling.  This is a snippet from a form and I want to make a field visible once the non-blank value from the previous field is selected.  Thus, once non-blank 'criteria' is selected, I want to make the 'criteria_reason' field visible.  How can this code be fixed?</p>
  
  <pre><code>&lt;%= f.select :criteria, ['', 'Yes', 'No', 'Maybe'] %&gt;
  
  &lt;%= f.text_field :criteria_reason, class:"form-control", placeholder:'Reason',
        style:"#{'display:none' if :criteria == ''}" %&gt;
  </code></pre>
  
  <p>Thanks!</p>