Nevermind... I found it. I forgot the :method => :get.
On Oct 27, 1:37 am, riles01
<ryan.ri...-75D+SkCOd7Z46IMFfmbxvA@public.gmane.org>
wrote:> I have the following partial that I''m trying to load with a
> link_to_remote call:
>
> <div id="person_<%= person.id %>"
class="item">
> <div class="details">
> <span class="name"><%= link_to_remote
h(person.name), :url =>
> contacts_person_path(person),
> :html => { :href =>
> contacts_person_path(person) } %></span><br />
> <%= link_to h(person.company.name),
> contacts_company_path(person.company) %><br />
> <%=h person.title %>
> </div>
>
> <div class="options">
> <%= link_to_remote ''Edit'', :url =>
> edit_contacts_person_path(person),
> :html => { :href =>
> edit_contacts_person_path(person) } %><br />
> <%= link_to_remote ''Delete'', :url =>
> contacts_person_path(person), :confirm => ''Okay to
delete?'', :method
> => ''delete'',
> :html => { :href =>
> contacts_person_path(person) } %>
> </div>
> </div>
>
> However, whenever I try to go to either the ''show'' action
(the first
> link_to_remote) or the ''edit'' action, the :action gets
the person.id,
> and the :id gets the action. I can see this in the logs, but I have no
> idea how to fix it. I tried using both
>
> :url => { :controller => "contacts/people", :action
=> "edit", :id
> => person }
>
> and
>
> :url => { :controller => "contacts/people", :id =>
"edit", :action
> => person }
>
> but both give the same error as calling the path. Any help would be
> much appreciated. I''m using Rails 1.2.5.
--~--~---------~--~----~------------~-------~--~----~
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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---