Pregunta

I want have my form have a placeholder like

Please enter the store's address

How can I edit the form below to get the apostrophe to work?

<%= text_area_tag 'store', '', class: 'form-control', placeholder: 'Please enter the store's address' %> 
¿Fue útil?

Solución

You can escape apostrophe with backslash:

<%= text_area_tag 'store', '', class: 'form-control', placeholder: 'Please enter the store\'s address' %>

or use string literal with quotation marks:

<%= text_area_tag 'store', '', class: 'form-control', placeholder: "Please enter the store's address" %>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top