Skip to content

Instantly share code, notes, and snippets.

@joemocha
Created November 9, 2010 19:23
Show Gist options
  • Save joemocha/669635 to your computer and use it in GitHub Desktop.
Save joemocha/669635 to your computer and use it in GitHub Desktop.
DB = {
:redis => SITE_REDIS,
:geo => GEO
}
SITES = DB[:redis].smembers("sites").inject({}) do |sum, site|
sum[site] = JSON.parse(DB[:redis]["site:#{site}"])
sum
end
if site = SITE_REDIS["site:" + FCG_CONFIG.app.base_domain]
SITE = JSON.parse(site)
REDIRECT_FROM = SITE["extra"]["from"][Rails.env]
else
raise "Run 'rake seed:sites' on fcg service server"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment