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.3.2 spec/document_ext.rb
mongo_doc-0.3.1 spec/document_ext.rb
mongo_doc-0.3.0 spec/document_ext.rb
mongodoc-0.2.4 spec/document_ext.rb
mongodoc-0.2.2 spec/document_ext.rb
mongodoc-0.2.1 spec/document_ext.rb
mongodoc-0.2.0 spec/document_ext.rb