search for: strip_whitespaces

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

Did you mean: strip_whitespace
2009 Feb 07
5
before_save :strip_whitespace => saves with spaces
i used this private function for removing leading and trailing white spaces from the values.that below function would be called before_save. when i print the value after it strips.it prints string without any spaces.but in the table fields it saves with spaces . waht would be the problem.pls help me class CompanyInfo < ActiveRecord::Base before_save :strip_whitespace def strip_whitespace