Closed ghost closed 5 years ago
One way would be to use a hash value:
Setting.phone = { telephoneNumber: '111-222-3333', description: 'Telephone number of boss' }
Then in your form, you could have:
<label><%= Setting.phone['description'] %></label>
<p><%= f.phone_number, value: Setting.phone['telephoneNumber'] %></p>
Use Rails I18n https://guides.rubyonrails.org/i18n.html
I'm using the basic form in Readme, but I receive my "var" content, eg. "telephoneNumber", instead I need a description in my form, something like: "Telephone number of boss". In the database schema I need a new column for this? Something like a "description" column? Or I'm totally wrong?
If I change my var in: "Telephone number of boss" I need to recall in my code what? This:
Setting.Telephone number of boss
?????? IMPOSSIBLE! No?