# \[Help\] Rendering a partial with link\_to function&effects

**URL:** <https://www.ruby-forum.com/t/help-rendering-a-partial-with-link-to-function-effects/154440>\
**Category:** Rails\
**Created:** [November 29, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/help-rendering-a-partial-with-link-to-function-effects/154440 "2008-11-29T17:41:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@mathao](https://www.ruby-forum.com/u/mathao)\
**Post date:** [November 29, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/help-rendering-a-partial-with-link-to-function-effects/154440/1 "2008-11-29T17:41:45Z")

</div>

Hello,

I’m trying to render a partial with link\_to\_function. In a partial  
called “\_search” I’m calling the method “searching” from  
search\_helper.rb as follows :

\<%searching%\>

The method searching looks like this :

def searching  
tags = @tags.strip  
tags\_array = tags.split(’ ')  
search\_tags = tags\_array.collect do |tag|  
%(#{tag}X)  
end  
end

As you see the following link is created for each element in tags: tag1X  
tag2X tagX …(X is a link)

Now I want to render a partial, which BlindsUp und Down with the  
visual\_effects helper BlindUp,BlindDown when clicking on a link next to  
the link “X”.

I tried :

def myhelper  
page.replace (“nav”, :partial=\>‘searchnavi’)  
end

def searching  
tags = @tags.strip  
tags\_array = tags.split(’ ')  
search\_tags = tags\_array.collect do |tag|  
%(#{tag}X{link\_to\_function “V” do |page|  
page.myhelper end}

)  
end  
end

Is this the right way to do this? Perhaps somebody could give me a hint  
how I could first render a partial an then BlindUp and BlindDown it  
smoothly over the \<div id="search\>\<% search %\> and not in it  
(like a DrowDown menÃ¼).

Thanks for your help and ecxuse my bad english 🙂
