You are here: Forums Ask a Rails expert Inserting ID to URL...
Posted in Forums : Ask a Rails expert
Authority 0
Posting Rating 0
Sign in to rate this post
|
I am creating a tinyurl clone based off of Robby Rusell’s Rubyurl. The purpose of the app is to not only shrink the size of a URL, but to also track how the new URL is being used. For example, if I wanted to create a new tiny URL to be used on behalf of one of my clients, I’d want to somehow pass a client ID to the new tiny URL so that it would look something like this: Question: how do I insert that clientID? Having a hard time wrapping my brain around this one. Thanks! |
Authority 12
Posting Rating 100
Sign in to rate this post
|
Well, doing anything with how your routes are generated would be handled in the routes.rb file. in routes.rb: in view: I hope this gets you headed down the right path. |
Authority 75
Posting Rating 97
Sign in to rate this post
|
I would map a root dispatch_controller to root (/) and glob the routes, the first being client id, the second being the generated token |
Ask a Rails expert : how to execute the url from my controller
Ask a Rails expert : conditional action caching multiple mongrel clusters
Ask a Rails expert : Using like command in RoR
Ask a Rails expert : Apache ActionController:RoutingError
Ask a Rails expert : Multiple csv file upload based on data in a form
Ask a Rails expert : Exception error code
Ask a Rails expert : Tracking down an issue
Ask a Rails expert : Thread Vs Transaction
Ask a Rails expert : implementing whitelist plugin
Ask a Rails expert : Validation helper