Created
October 22, 2012 20:16
-
-
Save dealforest/3933837 to your computer and use it in GitHub Desktop.
about settingslogin on Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Constants < Settingslogic | |
source "#{Rails.root}/config/constants.yml" | |
namespace Rails.env | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults: &defaults | |
twitter: | |
consumer_key : 'xxxxxxxxxxxxxxxxxxxxx' | |
consumer_secret : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
facebook: | |
consumer_key : 'xxxxxxxxxxxxxxx' | |
consumer_secret : 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
development: | |
<<: *defaults | |
test: | |
<<: *defaults | |
production: | |
<<: *defaults | |
# ここに書いて上書きすればおk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.omniauth :twitter, Constants.twitter.consumer_key, Constants.twitter.consumer_secret | |
config.omniauth :facebook, Constants.facebook.consumer_key, Constants.facebook.consumer_secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gemfile に settingslogic を追加している前提です