To answer my own question:

from_url = ActionController::Routing::Routes.recognize_path(url,
:method => :get)

Returns a hash of what I was after.

Cheers,
Walter

On Thu, Nov 4, 2010 at 1:59 PM, Walter McGinnis
<[email protected]> wrote:
> Hi,
>
> I have a URL value (session[:return_to]) that I want to derive the
> action and controller from.  Essentially what the routing system does
> for an actual web request when it puts together the params hash.
>
> My search-foo is letting me down.  What is the best method to get back
> the action and controller from a URL?
>
> TIA,
> Walter
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to