Permalink
Browse files

removing Mongoid::Components hack, tests are passing without it, add …

…tests if this is actually needed
  • Loading branch information...
1 parent ec616ae commit fc867c9c0d90b50f1a9a9f64b15beea9de6410b3 @ryanb committed Dec 30, 2010
Showing with 0 additions and 15 deletions.
  1. +0 −15 lib/cancan/model_adapters/mongoid_adapter.rb
@@ -51,18 +51,3 @@ def matches_conditions_hash_with_mongoid_subject?(subject, conditions = @conditi
alias_method :matches_conditions_hash?, :matches_conditions_hash_with_mongoid_subject?
end
end
-
-# Info on monkeypatching Mongoid :
-# http://log.mazniak.org/post/719062325/monkey-patching-activesupport-concern-and-you#footer
-# This link is now broken, anyone know what it was referring to?
-if defined?(::Mongoid)
- module Mongoid
- module Components
- old_block = @_included_block
- @_included_block = Proc.new do
- class_eval(&old_block) if old_block
- include CanCan::ModelAdditions
- end
- end
- end
-end

0 comments on commit fc867c9

Please sign in to comment.