Skip to content
This repository
Browse code

Fixing documentation to reflect deprecated add_to_base

  • Loading branch information...
commit bca9b84a4aed4fc83d35de73847c3ca871381f70 1 parent 8c6de67
Mikel Lindsaar authored September 12, 2010
4  activemodel/lib/active_model/validations.rb
@@ -100,7 +100,7 @@ def validates_each(*attr_names, &block)
100 100
       #     validate :must_be_friends
101 101
       #
102 102
       #     def must_be_friends
103  
-      #       errors.add_to_base("Must be friends to leave a comment") unless commenter.friend_of?(commentee)
  103
+      #       errors.add(:base, "Must be friends to leave a comment") unless commenter.friend_of?(commentee)
104 104
       #     end
105 105
       #   end
106 106
       #
@@ -114,7 +114,7 @@ def validates_each(*attr_names, &block)
114 114
       #     end
115 115
       #
116 116
       #     def must_be_friends
117  
-      #       errors.add_to_base("Must be friends to leave a comment") unless commenter.friend_of?(commentee)
  117
+      #       errors.add(:base, ("Must be friends to leave a comment") unless commenter.friend_of?(commentee)
118 118
       #     end
119 119
       #   end
120 120
       #

0 notes on commit bca9b84

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