Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Convert config over to Mongoid

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

0 comments on commit 89e52df

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