I''m no expert, but I think you want to do something like this in the
controller#display_details method:
render :update do |page|
page.replace_html(''details'', :partial =>
''display_details'')
end
Then have _display_details.rhtml output the html you want inside the
<div id="details"> .. </div> tags.
On Jul 27, 6:25 am, Paul Nichols
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> At present i have a list of items and a corresponding
''details''
> button...
>
> Step1 - Details
> Step2 - Details
> Step3 - Details
> Step4 - Details
> Step5 - Details
>
> I select details, and a <div
id=''details''></div> is updated underneath
> this list with further information taken from a separate table. The code
> for this is:
>
> <%= link_to_remote ("Details", :update =>
''details'', :url => { :action
> => :display_details, :id => step }) %>
>
> I then have a separate file called display_details.rhtml which contains
> the layout for these "details".
>
> However i''d now like to use SortHelper2 to sort the results
displayed in
> the <div>. This isn''t working and i believe it may be
resolved by using
> a partial.
>
> I''ve therefore gone ahead and changed display_details.rhtml to
> _display_details.rhtml.
>
> Here''s where i get stuck:
>
> I understand i need to place something along the lines of
>
> <%= render(:partial => ''display_details'') %>
>
> Where i''d like the details to display.
>
> However i can''t work out what i need to amend in the
link_to_remote
> section to keep the button that displays the details in the partial.
>
> If further code/information is needed please ask.
> --
> 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-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
-~----------~----~----~----~------~----~------~--~---