Create unique String

Hello comrades.

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

On Oct 13, 2:58pm, Tsolmon N. [email protected] wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs