Deriving controller/action from a RESTful URL

If I have a URL/PATH generated via Rails routing:

edit_foo_path(foo)) => “/foo/1;edit”

…is there some way that I can take that string and get its component
parts (controller, action, id, etc)??

I’m specifically looking for a solution that doesn’t involve me coming
up with a regex. I want to rely on code with Rails (which clearly
must exist).

Carter Rabasa

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs