search for: numericalise

Displaying 1 result from an estimated 1 matches for "numericalise".

2006 Apr 24
5
Sanitising a Phone Number input
...of keeping DRY I would like to ensure that the code sanitisation method is called whenever the data is edited (I''m using standard scaffolidng for this test). Is there anyway I can do this and keep the code overhead low? My current sanitisation method looks like this: private def numericalise!(*number) for n in number.phone do n.gsub!(/[^0-9]/, '''') end end Thanks in advance for your time and help. -- Posted via http://www.ruby-forum.com/.