I agree, I debated a lot between leaving them blank for non-production 
environments versus using ENV variables. I do see how ENV variables as 
default could be more confusing, especially to newer Rails devs, as it's 
not a pattern that we see anywhere else in Rails. Ultimately, I don't have 
a strong preference either way and I'd love to hear if other people have 
opinions one way or the other.

Newly proposed behavior for "rails generate config facebook app_id 
app_secret":
development:
  app_id:
  app_secret:

test:
  app_id:
  app_secret:

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  app_id: <%= ENV["FACEBOOK_APP_ID"] %>
  app_secret: <%= ENV["FACEBOOK_APP_SECRET"] %>




On Tuesday, May 5, 2015 at 7:33:18 PM UTC-7, Justin Weiss wrote:
>
> I like the idea, but I'm not sure about ENV-as-default in dev and test 
> environments. You usually won't have the environment variable set before 
> you generate the config, so it's no different than having it start off 
> blank. And either someone will have to set the environment variable, or 
> tweak the config before their app will run properly. I don't know which 
> would make a better default.
>
> On Tuesday, May 5, 2015 at 11:03:23 AM UTC-7, Kyle Rippey wrote:
>>
>> Oops, I meant "rails generate config facebook app_id app_secret". 
>> Obviously this belongs with all of the other generators.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to