Created
May 27, 2010 16:50
-
-
Save christianhager/416036 to your computer and use it in GitHub Desktop.
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
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