From 7b5ed66122873eebb773a6418f3a94d946cc4f8c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 19 Dec 2004 11:25:55 +0000 Subject: Added respondence to *_before_type_cast for all attributes to return their string-state before they were type casted by the column type. Added use of *_before_type_cast for all input and text fields. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/fixtures/developer.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'activerecord/test/fixtures/developer.rb') diff --git a/activerecord/test/fixtures/developer.rb b/activerecord/test/fixtures/developer.rb index 1c4cc30506..78f8f54db7 100644 --- a/activerecord/test/fixtures/developer.rb +++ b/activerecord/test/fixtures/developer.rb @@ -1,8 +1,6 @@ class Developer < ActiveRecord::Base has_and_belongs_to_many :projects - protected - def validate - errors.add_on_boundary_breaking("name", 3..20) - end + validates_inclusion_of :salary, :in => 50000..200000 + validates_length_of :name, :within => 3..20 end -- cgit v1.2.3