Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
How ti hide urls
4 Posts
How ti hide urls

Hi, In my app intially am signup with email only once create record user will get mail with link .once click on the link from mail it will take signup page to complete registration.Link is like http://localhost:3000/users/1/myaccount. But here i want to hide id "1".Instead of "1" i want to show some numbers like "183323232" this urls should be uniquly trackable . Can anybody help me please

Person
Forum Rating: 50
Sign In To Rate Post

You can create a unique/random string (e.g. 40 bytes) and place that in the link. When the link is clicked, lookup the user via the string. Don't follow the normal routing model. Of course, you'll have to store that string in the model.

You may take a look at the following example: http://github.com/AgileMantis/1of31. Look at my User registration and activation code base.

Hope this helps!

Brian

Person
Forum Rating: 0
Sign In To Rate Post

Tủ bếp Thùy Anh chuyên tư vấn thiết kế, cung cấp và phân phối các loại tủ bếp, phụ kiện tủ bếp, thiết bị nhà bếp chất lượng cao. Tủ bếp cao cấp Mọi thắc mắc xin liên hệ để được tư vấn miễn phí: http://www.tubepthuyanh.com.vn/ Trân trọng cảm ơn quý khách hàng

Công ty TNHH vàng bạc đá quí Minh Ngọc – chuyên: Nhan cuoi, vang bac, trang suc cuoi dep, nhan cuoi cao cap, nhan cuoi dep, nhan cuoi minh ngoc, nhan dinh hon Website: http://vangminhngoc.com/ Bạn hãy liên hệ để được tư vấn Nhan cuoi miễn phí nhé!

4 Posts
Login to add your message