I have to import names and addresses that have already been created without any validation. Does anyone know if there exists a standard/utility/bit of code etc that does the formatting automatically. Using titleize is a start, but there are obviously lots of additional formatting requirements such as Initials in caps etc. I know this is not strictly Rails, but it is for a rails project and I couldn''t think of another forum that I could pose this question on. Tonypm -- 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.
> I have to import names and addresses that have already been created > without any validation. > > Does anyone know if there exists a standard/utility/bit of code etc > that does the formatting automatically. Using titleize is a start, > but there are obviously lots of additional formatting requirements > such as Initials in caps etc. > > I know this is not strictly Rails, but it is for a rails project and I > couldn''t think of another forum that I could pose this question on.If they are US based addresses the USPS has a validate/adjustment service. No idea what it costs, but marketers use it to clean up there data. Good chance someone has written a ruby library to work with it. Names are harder... For every rule you come up with I''m sure I can think of a name that violates it... I don''t see any way to distinguish between ''DiMarco'' and ''Dimarco''. Is the first a typo? Not always... Good luck! -- 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.
tonypm wrote in post #950161:> I have to import names and addresses that have already been created > without any validation. > > Does anyone know if there exists a standard/utility/bit of code etc > that does the formatting automatically. Using titleize is a start, > but there are obviously lots of additional formatting requirements > such as Initials in caps etc. > > I know this is not strictly Rails, but it is for a rails project and I > couldn''t think of another forum that I could pose this question on.Would the Snail gem help?> > TonypmBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/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.
> > Would the Snail gem help? > >Thanks Marnen, looks like it may be of use, or at least a starting point. I''ll play with it and see Thanks Tonypm -- 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.