Hi,
I couldn''t find any plugins that sanitized string input. I''m
not sure
if searched for the wrong term, I searched for ''sanitize'' and
''normalize''. Maybe there is a better name for what
I''m trying to do.
But I basically want to run a few operations on string fields before
they are validated/saved to the db. Something declarative like:
class Model < ActiveRecord::Base
sanitizes :attribute, :truncate => { :length => 20 }, :downcase =>
true, :strip => true
end
I know I can do this pretty easily with callbacks but I wanted
something more declarative since I have a lot of these statements to
write. But I am looking for a plugin that does something similar to
the above.
Anyone know of any?
Thanks,
Keith
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.