> >> In any case, the arguments are whatever is defined in that particular
> >> route. Run rake routes or look at your routes file to see what that
> >> would be.
>
> > That doesn't make any sense.
>
> Whether it makes sense or not, it is the case. :)  The arguments are the
> :parameters in the route.

But I've never explicitly defined any parameters - and the notion of
the arguments simply being a params-like hash had never occurred to
me. I never saw it done.

> > My output of rake routes does not show a
> > function name for put requests.
>
> No, but if you're using map.resources, the paths for PUT requests are
> the same as for named GET requests.

also a point that was not being connected in my head.

> Using a link to a PUT request, though, is *extremely* smelly.  Links
> should practically always be GET.

not that i would do something so "ugly" as set a links appearance to
button - but does that make it any more acceptable? I've read plenty
of religious war associated with this concept and believe that it's
best evaluated on a need by need basis. In the workflow of my
application a link that is styled a certain way most certainly conveys
to the user that it "does something important". With xss protection in
rails and good testing it should be perfectly safe.

> >> as well as in the documentation for ActionController::Routing and
> >> ActionController::Resources . Perhaps you should read those again.
>
> > ActionController::Resources is the only one of those that even hints
> > at the proper form for the _path functions and that's only in the very
> > first example which doesn't even say that it can be used for those
> > functions - it only says "this is what a so-and-so request looks
> > like".
> >http://rails.rubyonrails.org/classes/ActionController/Resources.html
>
> There's also the stuff about named routes in ActionController::Routing.
>
>
>
> > to quote the docs a little further down it says:
> > Named Route     Helper
> > message            message_url(id), hash_for_message_url(id),
> > message_path(id), hash_for_message_path(id)
>
> > that would lead me to believe that the only argument available to
> > those functions is id...
>
> Again, it depends on how your routes are defined.

That sentence should be added to the docs somewhere.

> >> > maybe someone who knows could point me to where these functions are
> >> > defined in the source tree (preferably in master)?
>
> > This is all I'm really interested in now. Simply for curiosities
> > sake... The rest I've figured out and is all moot.
>
> I suspect looking at the source for the resources function would be a
> good place to start.

Thank you kindly for the tip in that direction.

> Best,
> --
> Marnen Laibow-Koserhttp://www.marnen.org
> mar...@marnen.org
> --
> Posted viahttp://www.ruby-forum.com/.
>
> --
> 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 rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to