On a side note, I came across this a while back:

Haven't used it, but its supposed to check if a URL can actually be reached or not. Not sure if this helps you since
I don't know exactly what you're using the submitted url's for, but figured I'd throw it out there.

On Aug 23, 2006, at 3:41 PM, Patrick Crowley wrote:

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

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

Reply via email to