Friday, January 20, 2006

Find a record with the id from the link

To find a record (site) from the id in the link,
Site.find(@params['id'])

To delete this record
Site.find(@params['id']).destroy

1 Comments:

At 3:12 AM, Blogger Unknown said...

Deleting a record on this way is generally a bad habbit. What if someone changes the URL? Or even worse, what about prefetching URLs?

 

Post a Comment

<< Home

eXTReMe Tracker