Change value of variable from config file and store it back

I’m having a global variable that is placed in development.rb. How can I
change the value of that variable from within the code and store it back
to the config file?

Dima Hristov wrote:

I’m having a global variable that is placed in development.rb. How can I
change the value of that variable from within the code and store it back
to the config file?

I’ve been told in the IRC channel that it is not practical to store it
in the *.rb file, and that a better approach would be storing it in my
custom config file and the code from developemt.rb would load that
global variable from the config file. I agree with it.