Skip to content
Browse files

Convert config over to Mongoid

  • Loading branch information...
1 parent 6ccf37c commit 89e52dfb093039b1bea8334d39b90c470f87ed22 @nbudin committed Apr 6, 2012
View
5 config/application.rb
@@ -13,6 +13,11 @@
module Vellum
class Application < Rails::Application
+ # Observers will not be invoked unless they are instantiated first. If you are
+ # using Rails, Mongoid will instantiate your observers automatically as long
+ # as you register them in your config/application.rb file.
+ config.mongoid.observers = :doc_observer
+
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
View
7 config/environments/development.rb
@@ -21,11 +21,4 @@
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
-
- # Raise exception on mass assignment protection for Active Record models
- config.active_record.mass_assignment_sanitizer = :strict
-
- # Log the query plan for queries taking more than this (works
- # with SQLite, MySQL, and PostgreSQL)
- config.active_record.auto_explain_threshold_in_seconds = 0.5
end
View
6 config/environments/test.rb
@@ -33,12 +33,6 @@
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
-
- # Print deprecation notices to the stderr
- config.active_support.deprecation = :stderr
-
- # Raise exception on mass assignment protection for Active Record models
- config.active_record.mass_assignment_sanitizer = :strict
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true
View
2 config/initializers/devise.rb
@@ -90,7 +90,7 @@
# ==> General configuration
# Load and configure the ORM. Supports :active_record (default), :mongoid
# (requires mongo_ext installed) and :data_mapper (experimental).
- require 'devise/orm/active_record'
+ require 'devise/orm/mongoid'
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "sessions/users/new". It's turned off by default because it's slower if you
View
1 config/initializers/observers.rb
@@ -1 +0,0 @@
-ActiveRecord::Base.observers = :doc_observer

0 comments on commit 89e52df

Please sign in to comment.
Something went wrong with that request. Please try again.