Skip to content

Instantly share code, notes, and snippets.

@BigMcLargeHuge
Created December 17, 2015 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BigMcLargeHuge/742cf7bbaeba5172bace to your computer and use it in GitHub Desktop.
Save BigMcLargeHuge/742cf7bbaeba5172bace to your computer and use it in GitHub Desktop.
I'm attempting to add the data attribute "data-region-id" to a simple_form input as shown in the excerpt in edit.html.erb.
However, when I do, I get the following error:
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...
... ^
...
<div class="form-inline"><%= f.input :country, as: :select, input_html: {data-region-id: "person_state", class: 'country form_control crs-country'}, label: "Country" %></div>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment