Вопрос

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' %> 
Это было полезно?

Решение

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" %>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top