Commit 8e5a029c734437cd3d855e2297195ce984c63a67
1 parent
e59f5110
Exists in
master
and in
1 other branch
remove old code related to mongoid bug
looks like this mongoid bug was fixed here: https://github.com/mongoid/mongoid/commit/2b7407977452a1f05d6eb5edf2d9a00b0c359ccf
Showing
2 changed files
with
0 additions
and
18 deletions
Show diff stats
config/initializers/overrides.rb
1 | -require Rails.root.join('lib/overrides/mongoid/relations/builder') | ||
2 | require Rails.root.join('lib/overrides/devise/failure_app') | 1 | require Rails.root.join('lib/overrides/devise/failure_app') |
3 | require Rails.root.join('lib/overrides/hoptoad_notifier/hoptoad_notifier') | 2 | require Rails.root.join('lib/overrides/hoptoad_notifier/hoptoad_notifier') |
4 | - |
lib/overrides/mongoid/relations/builder.rb
@@ -1,16 +0,0 @@ | @@ -1,16 +0,0 @@ | ||
1 | -# ruby-fogbugz requires crack. crack adds the attributes method to strings, | ||
2 | -# thus breaking the relations of Mongoid. | ||
3 | -# Tests reside in a separate fork of mongoid: | ||
4 | -# https://github.com/mhs/mongoid/commit/e5b2b1346c73a2935c606317314b6ded07260429#diff-1 | ||
5 | -module Mongoid | ||
6 | - module Relations | ||
7 | - class Builder | ||
8 | - def query? | ||
9 | - return true unless object.respond_to?(:to_a) | ||
10 | - obj = object.to_a.first | ||
11 | - !obj.is_a?(Mongoid::Document) && !obj.nil? | ||
12 | - end | ||
13 | - end | ||
14 | - end | ||
15 | -end | ||
16 | - |