Sha256: 4f37e18bfa38dde526a77c4e3c80dbf44b738cfae9682ce3a1b627f618965418

Contents?: true

Size: 177 Bytes

Versions: 12

Compression:

Stored size: 177 Bytes

Contents

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mongo_doc-0.6.26 spec/document_ext.rb
mongo_doc-0.6.25 spec/document_ext.rb
mongo_doc-0.6.23 spec/document_ext.rb
mongo_doc-0.6.22 spec/document_ext.rb
mongo_doc-0.6.21 spec/document_ext.rb
mongo_doc-0.6.20 spec/document_ext.rb
mongo_doc-0.6.19 spec/document_ext.rb
mongo_doc-0.6.18 spec/document_ext.rb
mongo_doc-0.6.17 spec/document_ext.rb
mongo_doc-0.6.16 spec/document_ext.rb
mongo_doc-0.6.15 spec/document_ext.rb
mongo_doc-0.6.14 spec/document_ext.rb