>
> > what does the output of:
> >
> > rake routes
> >
> > look like?
> >
> > --wpd
>
>                                    roles GET    /roles
> {:action=>"index", :controller=>"roles"}
>                                       formatted_roles GET
> /roles.:format
> {:action=>"index", :controller=>"roles"}
>                                                       POST   /roles
> {:action=>"create", :controller=>"roles"}
>                                                       POST
> /roles.:format
> {:action=>"create", :controller=>"roles"}
>                                              new_role GET    /roles/new
> {:action=>"new", :controller=>"roles"}
>                                    formatted_new_role GET
> /roles/new.:format
> {:action=>"new", :controller=>"roles"}
>                                             edit_role GET
> /roles/:id/edit
> {:action=>"edit", :controller=>"roles"}
>                                   formatted_edit_role GET
> /roles/:id/edit.:format
> {:action=>"edit", :controller=>"roles"}
>                                                  role GET    /roles/:id
> {:action=>"show", :controller=>"roles"}
>                                        formatted_role GET
> /roles/:id.:format
> {:action=>"show", :controller=>"roles"}
>                                                       PUT    /roles/:id
> {:action=>"update", :controller=>"roles"}
>                                                       PUT
> /roles/:id.:format
> {:action=>"update", :controller=>"roles"}
>                                                       DELETE /roles/:id
> {:action=>"destroy", :controller=>"roles"}
>                                                       DELETE
> /roles/:id.:format
> {:action=>"destroy", :controller=>"roles"}
>  {:action=>"wsdl"}
>
>  /:controller/:action/:id.:format
>
>  /:controller/:action/:id
>
> In all my humble newbieness, it looks to me like, when you get a URL of the
form /roles/something?with_this?and_that, the first pattern that the route
table finds that matches that is the pattern that looks like: /roles/:id, so
you get routed to the "show" action of the "roles"controller.  I know that
the routes table is processed in order and the first pattern that matches is
the one that triggers the action (which is why the /:controller/:action/:id
pattern is always listed last.).

What I don't know is, why does {:action => "remove_role_from_account",
:role_id => role, :account_id => @account} produce a url of the form:
/roles/remove_role_from_account, when you specifically plug in an action of
"remove_role_from_account".

Sorry if this doesn't help much.

--wpd

--~--~---------~--~----~------------~-------~--~----~
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