Re: [OT] Not everything goes well in Ruby land :-)

"Pierce T. Wetter III" <[email protected]> Mon, 7 Jan 2008 15:10:22 -0700
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
>  What do you think? What are the goods and the bads of exposing PKs  
> in URLs?

   It depends on what they look like.

   I always expose _encrypted_ primary keys in my URLs, so that people  
can't generalize:

  10000001
  10000002
  10000003

  etc. There's a method in Wonder that makes this easy.

   After that, since URLs are always in the browser history anyways,  
for things that have to be secure, I have a method that takes the  
encrypted primary key, a key path, and session.user and makes sure  
that if you follow the specified key path from the object pointed at  
by the encrypted primary key, that you reach session.user.

  Pierce