Skip to content

Instantly share code, notes, and snippets.

@LBRapid
Created July 19, 2010 13:37
Show Gist options
  • Save LBRapid/481409 to your computer and use it in GitHub Desktop.
Save LBRapid/481409 to your computer and use it in GitHub Desktop.
Setup recaptcha keys in an initializer to easily make global changes to settings. Ex: config/initializers/recaptcha.rb
if Rails.env.production?
ENV['RECAPTCHA_PUBLIC_KEY'] = 'your_production_key'
ENV['RECAPTCHA_PRIVATE_KEY'] = 'your_production_key'
else
ENV['RECAPTCHA_PUBLIC_KEY'] = 'your_global_key'
ENV['RECAPTCHA_PRIVATE_KEY'] = 'your_global_key'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment