Commit 74b76ef2a299cc4830d161e59af1f88658ab4e61
1 parent
5364d943
Exists in
master
and in
1 other branch
Define some Mongoid option mandatory by define if there are ENV
configuration or not Revert in commit [f021f13444f727888986ea79fad36b77ca0f6ae7]
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
config/initializers/mongo.rb
| @@ -28,7 +28,6 @@ elsif ENV['HEROKU'] || ENV['USE_ENV'] | @@ -28,7 +28,6 @@ elsif ENV['HEROKU'] || ENV['USE_ENV'] | ||
| 28 | hosts: [ "#{settings.host}:#{settings.port}" ] | 28 | hosts: [ "#{settings.host}:#{settings.port}" ] |
| 29 | } | 29 | } |
| 30 | }, | 30 | }, |
| 31 | - options: { allow_dynamic_fields: false, use_activesupport_time_zone: true, identity_map_enabled: true } | ||
| 32 | } | 31 | } |
| 33 | 32 | ||
| 34 | if settings.user && settings.password | 33 | if settings.user && settings.password |
| @@ -39,3 +38,7 @@ elsif ENV['HEROKU'] || ENV['USE_ENV'] | @@ -39,3 +38,7 @@ elsif ENV['HEROKU'] || ENV['USE_ENV'] | ||
| 39 | config.load_configuration(hash) | 38 | config.load_configuration(hash) |
| 40 | end | 39 | end |
| 41 | end | 40 | end |
| 41 | + | ||
| 42 | +Mongoid.allow_dynamic_fields = false | ||
| 43 | +Mongoid.use_activesupport_time_zone = true | ||
| 44 | +Mongoid.identity_map_enabled = true |