lundi 10 juillet 2017

text_field_tag placeholder ignoring dynamic text after space in rails

I am using I18n for internationalization. for displaying place holder content in locale language in placeholder of text_field_tag im using following code.

<%= text_field_tag('email', "", class: 'form-control', placeholder: t('shared.enter_email')%>

And config/locales/en.yml content is as follows:

en:
  shared:
    enter_email: Enter Email

on running application, the content in the placeholder contains only Enter and its ignoring name because there is a space in-between.

i tried different syntax, all are producing same result. Is there a way to get this done?

Aucun commentaire:

Enregistrer un commentaire