Skip to content

Instantly share code, notes, and snippets.

@neovintage
Created December 17, 2011 17:04
Show Gist options
  • Save neovintage/1490742 to your computer and use it in GitHub Desktop.
Save neovintage/1490742 to your computer and use it in GitHub Desktop.
Configuring Rails 3 Plugin
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.perform_deliveries = false
config.action_mailer.default :charset => "utf-8"
config.active_support.deprecation = :log
config.mongo_fifo = MongoFifo::Store.new(Mongo::Connection.new['mongo_fifo'])
initializer "mongo_fifo.configure_mongodb_connection" do |app|
unless defined?(FIFO_CACHE)
silence_warnings { Object.const_set "FIFO_CACHE", app.config.mongo_fifo }
end
end
module MongoFifo
class Railtie < Rails::Railtie
config.mongo_fifo = ActiveSupport::OrderedOptions.new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment