Sha256: d278a3f9277c5bf8926eb7178daa2ec2c1221f12ee8c48fb642eac2fcd2040b0

Contents?: true

Size: 180 Bytes

Versions: 27

Compression:

Stored size: 180 Bytes

Contents

module MongoDoc
  module Document
    def errors_on(attribute)
      self.valid?
      [self.errors.on(attribute)].flatten.compact
    end
    alias :error_on :errors_on
  end
end

Version data entries

27 entries across 27 versions & 3 rubygems

Version Path
mongo_doc-0.6.13 spec/document_ext.rb
mongo_doc-0.6.12 spec/document_ext.rb
mongo_doc-0.6.11 spec/document_ext.rb
mongo_doc-0.6.10 spec/document_ext.rb
mongo_doc-0.6.9 spec/document_ext.rb
mongo_doc-0.6.8 spec/document_ext.rb
mongo_doc-0.6.7 spec/document_ext.rb
mongo_doc-0.6.6 spec/document_ext.rb
mongo_doc-0.6.5 spec/document_ext.rb
mongo_doc-0.6.4 spec/document_ext.rb
mongo_doc_rails2-0.6.2 spec/document_ext.rb
mongo_doc-0.6.3 spec/document_ext.rb
mongo_doc-0.6.2 spec/document_ext.rb
mongo_doc-0.6.1 spec/document_ext.rb
mongo_doc-0.6.0 spec/document_ext.rb
mongo_doc_rails2-0.6.1 spec/document_ext.rb
mongo_doc-0.5.5 spec/document_ext.rb
mongo_doc-0.4.2 spec/document_ext.rb
mongo_doc-0.4.1 spec/document_ext.rb
mongo_doc-0.4.0 spec/document_ext.rb