Forum: Ruby on Rails Any way to hide / mask / salt record ID?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Robert S. (Guest)
on 2009-05-21 07:18
In RoR applications, each record is accessed by its own ID, usually as
in products/ID. However, I'd prefer that users not be able to know how
many records are in the database nor be able to access them on an
incremental basis. Is there any way to hide or mask this ID through the
use of an alternate? Salting the IDs seems like it could work, but I'm
not sure how to do it - if its even the right way.

Thanks in advance!
Svetlana V. (Guest)
on 2009-05-21 10:27
Robert S. wrote:
> In RoR applications, each record is accessed by its own ID, usually as
> in products/ID. However, I'd prefer that users not be able to know how
> many records are in the database nor be able to access them on an
> incremental basis. Is there any way to hide or mask this ID through the
> use of an alternate? Salting the IDs seems like it could work, but I'm
> not sure how to do it - if its even the right way.
>
> Thanks in advance!

see a plugin http://github.com/hashtrain/acts_as_random_id/tree/master
This topic is locked and can not be replied to.