search for: get_url_path_by_short_url

Displaying 1 result from an estimated 1 matches for "get_url_path_by_short_url".

2011 Mar 17
0
Testing route with proc --- possible and how?
I have this route (Rails 3) which handles redirecting shortened urls: # handles the shortened url lookup match '':hash'' => redirect { |params| Sharing.get_url_path_by_short_url(params[:hash]) }, :constraints => { :hash => /[a-zA-Z0-9]{7}/ } It works correctly at the ui. However am having trouble getting a spec working for it. Note that in the UI the user must be logged in to get to the url, but the traffic first hits the directed route and then app controller handl...