--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1e01fabb-1b47-415e-84c2-bc78442fddfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why not just use an environment variable. For example, <%= ENV[‘MY_DB_PASSWORD’] %>. Then you can export that from your specific environment or fire up your task with the environment var set, ex: `MY_DB_PASSWORD=letsparty rails s`
Why not just use an environment variable. For example, <%= ENV[‘MY_DB_PASSWORD’] %>. Then you can export that from your specific environment or fire up your task with the environment var set, ex: `MY_DB_PASSWORD=letsparty rails s`
Hi Matt,
thanks for your advice. Maybe this is an alternative in this case, but I would like to know how to tackle this for custom functions in general.
I found out that if I copy the function to config/application, rake finds it. If it is the proper solution for yml-helper functions I don't know. Maybe someone has advice on this.
So any functions I had defined within config/initializers/storage.rb should be available to the ERB parser.
This is for Rahoul, not the OP:
Rails 4.1 introduced the #config_for method on the Rails application,
which makes all the reading, erbing, and yamling of config files really
super simple. You can change your above initializer to: