title: Adding html data attribute to simple_forms input
body: <p>I'm attempting to implement a javascript plugin that requires me to add the data attribute: <code>data-region-id</code> to a select input.  I've attempted to do so as follows (the input that you'd be looking for is <code>:country</code>, third from the bottom):</p>
  
  <pre><code>&lt;div id="capdiv"&gt;
      &lt;h1&gt;People#edit&lt;/h1&gt;
      &lt;p&gt;Find me in app/views/people/edit.html.erb&lt;/p&gt;
      &lt;%=  simple_form_for @person, url: url_for(action:'update', controller:'people'), update: { success: "response", failure: "error"} do |f| %&gt;
          &lt;div class="clearfix entity-add nested-fields person"&gt;
              &lt;div class="dynamic-container"&gt;
                  &lt;div class="symegrid"&gt;
                      &lt;div class="form-inline"&gt;
                          &lt;%= f.input :fname, input_html: {class: 'fname form-input form-control fifty'}, label: "First Name" %&gt;
                          &lt;%= f.input :lname, input_html: {class: 'lname form-input form-control fifty'}, label: "Last Name" %&gt;
                      &lt;/div&gt;
                      &lt;div class="form-inline"&gt;
                          &lt;%= f.input :email, as: :email, input_html: {class: 'email form-input form-control'}, label: "Email" %&gt;
                          &lt;%= f.input :telephone, input_html: {class: 'telephone form-input form-control'}, label: "Telephone" %&gt;
                      &lt;/div&gt;
                      &lt;div class="form-inline"&gt;
                          &lt;%= f.input :street, input_html: {class: 'street form-input form-control'}, label: "Street" %&gt;
                          &lt;%= f.input :city, input_html: {class: 'city form-input form-control'}, label: "City" %&gt;
                      &lt;/div&gt;
                      &lt;div class="form-inline"&gt;&lt;%= f.input :country, as: :select, input_html: {data-region-id: "person_state", class: 'country form_control crs-country'}, label: "Country" %&gt;&lt;/div&gt;
                      &lt;div class="form-inline"&gt;
                          &lt;%= f.input :state, as: :select, input_html: { id: "person_state", class: 'state form-control' }, label: "State/Province" %&gt;
                          &lt;%= f.input :zip, input_html: {class: 'zip form-input form-control'}, label: "Zip" %&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;% end %&gt;
  &lt;/div&gt;     
  </code></pre>
  
  <p>However, when I attempt to load the page, I get the following error message:</p>
  
  <pre><code>SyntaxError (/home/sam/Dropbox/railsproject/legal/app/views/people/edit.html.erb:20: syntax error, unexpected tLABEL
  ...t, input_html: {data-region-id: "person_state", class: 'coun...
  ...                               ^
  /home/sam/Dropbox/railsproject/legal/app/views/people/edit.html.erb:20: syntax error, unexpected ',', expecting ')'
  ...data-region-id: "person_state", class: 'country form_control...
  ...                               ^
  /home/sam/Dropbox/railsproject/legal/app/views/people/edit.html.erb:20: syntax error, unexpected '}', expecting ')'
  ...ntry form_control crs-country'}, label: "Country" );@output_...
  ...                               ^):
    app/views/people/edit.html.erb:20: syntax error, unexpected tLABEL
    app/views/people/edit.html.erb:20: syntax error, unexpected ',', expecting ')'
    app/views/people/edit.html.erb:20: syntax error, unexpected '}', expecting ')'
  </code></pre>
  
  <p>How should I add this attribute?  I was thinking that, worst case scenario, I could force it with some javascript once the page loads but that seems unnecessary.</p>
  
  <p>Thanks in advance.</p>