Comment on "
Rails validates_length_of and Fixnum
"
by ben — Nov 02, 05
To validate a fixnum zipcode you may use case:
zipcode = 12345
case zipcode
when 10000..99999 then puts "Ok!"
else puts "No five digits!"
end
Back to "
Rails validates_length_of and Fixnum
"
Technorati Profile
Copyright © Scott Stevenson 2004-2006
by ben — Nov 02, 05
zipcode = 12345
case zipcode
when 10000..99999 then puts "Ok!"
else puts "No five digits!"
end