I usually use a before validate hook, and do things like: def normalize_fields self.foo = nil if self.foo.blank? self.bar = nil if self.bar.blank? end
On Wed, Mar 4, 2009 at 2:24 AM, Fresh Mix <[email protected]> wrote: > > Is there some better way to do this? > > http://assertbuggy.blogspot.com/2007/06/ruby-on-rails-params-and-empty-strings.html > -- > Posted via http://www.ruby-forum.com/. > > > > -- (Ruby, Rails, Random) blog: http://skandragon.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

