search for: auto_strip

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

Did you mean: ast_strip
2007 Dec 13
2
automatically strip values of activerecord attributes
...s class User < ActiveRecord::Base def name=(val) write_attribute :name, val.to_s.strip end end quite clear, it strips the name when setting it. now the question: Is it possible to do something like the following .. and if yes how could i achieve it class User < ActiveRecord::Base auto_strip :name, :street end thanks... -- Posted via http://www.ruby-forum.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 rubyonrails-talk-/JYP...