Skip to content
This repository
Browse code

Enhance validations documentation

  • Loading branch information...
commit b2ccae466e12659df97969661dae389ac0eb6e2c 1 parent a2fac64
Oscar Del Ben authored April 26, 2012
2  activemodel/lib/active_model/validations.rb
@@ -65,7 +65,7 @@ module ClassMethods
65 65
       #
66 66
       #     attr_accessor :first_name, :last_name
67 67
       #
68  
-      #     validates_each :first_name, :last_name do |record, attr, value|
  68
+      #     validates_each :first_name, :last_name, :allow_blank => true do |record, attr, value|
69 69
       #       record.errors.add attr, 'starts with z.' if value.to_s[0] == ?z
70 70
       #     end
71 71
       #   end

0 notes on commit b2ccae4

Please sign in to comment.
Something went wrong with that request. Please try again.