Sha256: 671ccb00728dbd55c990073b1632c16753b61c6184baa860fc784d0031b0d123

Contents?: true

Size: 261 Bytes

Versions: 10

Compression:

Stored size: 261 Bytes

Contents

module MongoDoc
  module Validations
    class ValidatesEmbedded < ::Validatable::ValidationBase
      def valid?(instance)
        instance.send(attribute).valid?
      end

      def message(instance)
        super || "is invalid"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
mongo_doc_rails2-0.6.1 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.5.5 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.4.2 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.4.1 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.4.0 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.3.2 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.3.1 lib/mongo_doc/validations/validates_embedded.rb
mongo_doc-0.3.0 lib/mongo_doc/validations/validates_embedded.rb
mongodoc-0.2.4 lib/mongodoc/validations/validates_embedded.rb
mongodoc-0.2.2 lib/mongodoc/validations/validates_embedded.rb