Skip to content

Instantly share code, notes, and snippets.

@christianhager
Created May 27, 2010 16:50
Show Gist options
  • Save christianhager/416036 to your computer and use it in GitHub Desktop.
Save christianhager/416036 to your computer and use it in GitHub Desktop.
require File.expand_path('../boot', __FILE__)
require 'uri'
if ENV['MONGOHQ_URL']
mongo_uri = URI.parse(ENV['MONGOHQ_URL'])
ENV['MONGOID_HOST'] = mongo_uri.host
ENV['MONGOID_PORT'] = mongo_uri.port.to_s
ENV['MONGOID_USERNAME'] = mongo_uri.user
ENV['MONGOID_PASSWORD'] = mongo_uri.password
ENV['MONGOID_DATABASE'] = mongo_uri.path.gsub("/", "")
end
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'active_resource/railtie'
require 'rails/test_unit/railtie'
require 'mongoid/railtie'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Blog
class Application < Rails::Application
config.generators do |g|
g.orm :mongoid
end
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment