# Still struggling on trying to implement a partial

**URL:** <https://www.ruby-forum.com/t/still-struggling-on-trying-to-implement-a-partial/110544>\
**Category:** Rails\
**Created:** [July 27, 2007, 12:25pm UTC](https://www.ruby-forum.com/t/still-struggling-on-trying-to-implement-a-partial/110544 "2007-07-27T12:25:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanouk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Post date:** [July 27, 2007, 12:25pm UTC](https://www.ruby-forum.com/t/still-struggling-on-trying-to-implement-a-partial/110544/1 "2007-07-27T12:25:35Z")

</div>

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

 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

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

---

<div class="post-metadata">

**Author:** ![nanouk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Post date:** [July 27, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/still-struggling-on-trying-to-implement-a-partial/110544/2 "2007-07-27T21:29:42Z")

</div>

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

 .. 
 tags.

On Jul 27, 6:25 am, Paul N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
