Skip to content

Instantly share code, notes, and snippets.

@mattpolito
Created October 28, 2011 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpolito/1321423 to your computer and use it in GitHub Desktop.
Save mattpolito/1321423 to your computer and use it in GitHub Desktop.
Initialize those Settings
CarrierWave.configure do |config|
config.fog_credentials = {
provider: 'AWS',
aws_access_key_id: Settings.aws.access_key,
aws_secret_access_key: Settings.aws.secret
}
config.fog_directory = Settings.aws.bucket
end
class Settings < Settingslogic
source "#{Rails.root}/config/settings.yml"
namespace Rails.env
end
defaults: &defaults
use_online_storage?: false
aws:
access_key: longstringkey
secret: supersecret
bucket: some-bucket-name
development:
<<: *defaults
test:
<<: *defaults
production:
<<: *defaults
use_online_storage?: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment