lib/blind_index/mongoid.rb
def create_criteria(base, document, attribute, value)
        klass = document.class
        if klass.respond_to?(:blind_indexes) && (bi = klass.blind_indexes[attribute])
          attribute = bi[:bidx_attribute]
        end
        super(base, document, attribute, value)
      end
# change attribute name here instead of validate_each for better error message
change attribute name here instead of validate_each for better error message
change attribute name here instead of validate_each for better error message
def create_criteria(base, document, attribute, value)
        klass = document.class
        if klass.respond_to?(:blind_indexes) && (bi = klass.blind_indexes[attribute])
          attribute = bi[:bidx_attribute]
        end
        super(base, document, attribute, value)
      end
def create_criteria ( base , document , attribute , value ) klass = document . class if klass . respond_to? ( :blind_indexes ) && ( bi = klass . blind_indexes [ attribute ] ) attribute = bi [ :bidx_attribute ] end super ( base , document , attribute , value ) end
change attribute name here instead of validate_each for better error message
change attribute name here instead of validate_each for better error message
base
document
attribute
value