In development mode, your class is going to get reloaded with every request, so the value that's set in an initializer at app startup will not persist when the class is reloaded after the first request. (The result of "config.cache_classes = false" in your development.rb).
However, if you want to set a value in an initializer and have it persist in development mode, you can either add it as a constant:
initializers.rb
SALT='savory_hash'
OR as an application config variable:
application.rb
module YourAppsName
class Application < Rails::Application
config.token_salt = "savory_hash"
end
end
which would be accessible anywhere in the app with:
Rails.application.config.token_salt
Of course, if you enable class caching in your environment, you should find that your variable's value will persist without doing anything of the above.