Follow

You may want to use the "citext" Postgres type to clean up messy Ruby downcase code when looking up slugs/emails/etc:

stackshare.io/jeromedalbert/de

@jeromedalbert interesting. not sure if I would prefer that over just downcasing when it comes in. easier to do other normalization (e.g. stripping spaces) in that case

@judofyr I guess it depends how often you need to downcase. At my current company it was very often, so I think it was worth it

Sign in to participate in the conversation
Ruby.social

A Mastodon instance for Rubyists & friends