Permalink
Browse files

Added documentation for Validations

Added HISTORY.txt
  • Loading branch information...
1 parent 1f9a1dc commit 7d140b7f37e6420470899cca1089bf9f274cde0d @bcardarella committed Jan 29, 2011
Showing with 26 additions and 4 deletions.
  1. +4 −0 HISTORY.txt
  2. +1 −1 LICENSE
  3. +1 −1 README.markdown
  4. +10 −1 lib/remarkable/mongoid/validate_association.rb
  5. +10 −1 lib/remarkable/mongoid/validate_uniqueness_of.rb
View
@@ -0,0 +1,4 @@
+## 0.5.1
+ * Updated for mongoid-2.0.0.rc.6
+ * reference_many_as_array Matcher is gone, replaced with the reference_many_and_be_referenced_in Matcher
+ * Added YARD documentation
View
@@ -1,4 +1,4 @@
-Copyright (c) 2009 Brian Cardarella
+Copyright (c) 2010 - 2011 Brian Cardarella
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -38,4 +38,4 @@ Validations
## Copyright
-Copyright (c) 2010 Brian Cardarella. See LICENSE for details.
+Copyright (c) 2010 - 2011 Brian Cardarella. See LICENSE for details.
@@ -1,5 +1,14 @@
module Remarkable::Mongoid
module Matchers
+
+ # Specify the document validates the association
+ #
+ # examples:
+ # it { should validate_association :dog }
+ #
+ # @param [Symbol]
+ #
+ # @return [Remarkable::Mongoid::Matchers::ValidateAssociationMatcher]
def validate_association(attr)
ValidateAssociationMatcher.new(attr)
end
@@ -28,4 +37,4 @@ def failure_message_for_should
end
end
-end
+end
@@ -1,5 +1,14 @@
module Remarkable::Mongoid
module Matchers
+
+ # Specify the document validates the uniqueness of the field's data
+ #
+ # examples:
+ # it { should validate_uniqueness_of :dog }
+ #
+ # @param [Symbol]
+ #
+ # @return [Remarkable::Mongoid::Matchers::ValidateUniquenessOfMatcher]
def validate_uniqueness_of(attr)
ValidateUniquenessOfMatcher.new(attr)
end
@@ -52,4 +61,4 @@ def check_option(validation, option)
end
end
-end
+end

0 comments on commit 7d140b7

Please sign in to comment.