سؤال

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