I have a key in rails application /my_app/config/settings.yml
I want to replace value of age from 25 to whatever user enters using ruby code.
How can i do it. Is it necessary to load the file first before writing the value?
Open the file in write mode
Read and parse the yml content from your file.
Replace the value
Write yml values into original file or a new file.
Rails provides internationalization support for static content ,
has_translations complements that and provides internationalization support for dynamic contents.
The gem can be find from here.