Occasionally I’ll see things like this in a code base.
1 2 3 4 5 6 7 |
|
I try to avoid writting methods like this. Rails provides a nice way to set environment specific variables.
http://guides.rubyonrails.org/configuring.html#custom-configuration
config/environments/staging.rb
1
|
|
config/environments/production.rb
1
|
|
So now you can refactor the method to this.
1 2 3 |
|