Create unique String

Hello comrades.

How to create unique string in Rails. i’ll use instead of id. (GET METHOD)

Hello comrades.

How to create unique string in Rails. i'll use instead of id. (GET METHOD)

Well there are a variety of gems (such as the uuid gem) for creating uuids if that's what you want. If you need something more random, then you might want to look at ActiveSupport::SecureRandom