So I'm working on a site where users submit links that have certain properties.

I'm using a couple of the standard validate helpers (presence_of, uniqueness_of, etc.) but there's additional content shaping I'd like to do.

So far, I've stuffed these additional content filters into my model's validate method. Things like stripping white space, using pattern matching to reformat malformed links, etc.

Just curious... is this common practice? I thought about putting this code in my controller, but it seems more appropriate to continually validate the link format, regardless of where content is entered into the system.

-- Patrick

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to