aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/validations.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-09-03 00:17:09 +0000
committerMichael Koziarski <michael@koziarski.com>2007-09-03 00:17:09 +0000
commit6246fad19a5ec747f5914c142b8631af212d47ea (patch)
tree7693248f7fd9e42a69bd13b4bbb94c4ed2d576e9 /activerecord/lib/active_record/validations.rb
parentf0dbd22c4647bf8e37fd9b58ce6652aaca27376e (diff)
downloadrails-6246fad19a5ec747f5914c142b8631af212d47ea.tar.gz
rails-6246fad19a5ec747f5914c142b8631af212d47ea.tar.bz2
rails-6246fad19a5ec747f5914c142b8631af212d47ea.zip
Remove deprecated functionality from edge rails. Closes #9387 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/validations.rb')
-rwxr-xr-xactiverecord/lib/active_record/validations.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index f259c2bbb6..7de391f6fa 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -83,19 +83,6 @@ module ActiveRecord
end
end
- # Will add an error message to each of the attributes in +attributes+ that has a length outside of the passed boundary +range+.
- # If the length is above the boundary, the too_long_msg message will be used. If below, the too_short_msg.
- def add_on_boundary_breaking(attributes, range, too_long_msg = @@default_error_messages[:too_long], too_short_msg = @@default_error_messages[:too_short])
- for attr in [attributes].flatten
- value = @base.respond_to?(attr.to_s) ? @base.send(attr.to_s) : @base[attr.to_s]
- add(attr, too_short_msg % range.begin) if value && value.length < range.begin
- add(attr, too_long_msg % range.end) if value && value.length > range.end
- end
- end
-
- alias :add_on_boundry_breaking :add_on_boundary_breaking
- deprecate :add_on_boundary_breaking => :validates_length_of, :add_on_boundry_breaking => :validates_length_of
-
# Returns true if the specified +attribute+ has errors associated with it.
#
# class Company < ActiveRecord::Base