[Rails]
Re: Re: Destructive behavior with link_to, button_to, :post
Kevin Olbrich
kevin.olbrich at duke.edu
Sun Jan 22 21:50:24 GMT 2006
Tom Mornini wrote:
> On Jan 22, 2006, at 12:26 PM, Kevin Olbrich wrote:
>
>>> Do I need to add a Javascript thing to go fetch that value from the
>>> selection item? Then add the selected "id" to the link?
>>>
>>> Jake
>>
>> link_to {:action=>'action', :id=>object.id}, {:post=>true}
>
> link_to {:action=>'action', :id=>object}, {:post=>true}
>
> .id is assumed.
>
> Rails is about less code... :-)
>
> --
> -- Tom Mornini
Yeah, I know. I prefer to be a little more explicit when writing
examples in case the reader didn't know that. Actually I think it calls
the to_param method so it can really be anything.
_Kevin
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list