# Render :partial

**URL:** <https://discuss.rubyonrails.org/t/render-partial/44734>\
**Category:** rubyonrails-talk\
**Created:** [July 31, 2009, 4:18pm UTC](https://discuss.rubyonrails.org/t/render-partial/44734 "2009-07-31T16:18:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lakshmi\_Narayana](https://avatars.discourse-cdn.com/v4/letter/l/5fc32e/32.png) [@Lakshmi\_Narayana](https://discuss.rubyonrails.org/u/Lakshmi_Narayana)\
**Post date:** [July 31, 2009, 4:18pm UTC](https://discuss.rubyonrails.org/t/render-partial/44734/1 "2009-07-31T16:18:57Z")

</div>

yup, you can just pass it like any other variable for example the code look like this.

render :partial =\> “added\_ads”,:local =\> {::ad =\> @ad}:collection=\>@ads.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [July 31, 2009, 4:41pm UTC](https://discuss.rubyonrails.org/t/render-partial/44734/2 "2009-07-31T16:41:05Z")

</div>

Lakshmi Narayana wrote:

> yup, you can just pass it like any other variable for example the code look like this. render :partial =\> "added\_ads",:local =\> {::ad =\> @ad}:collection=\>@ads.
> 
> On Fri, Jul 31, 2009 at 9:33 PM, Md Fisa

Thank you for you replay I got it .i named my partial as \_ad then

render :partial=\>"ad",:collection=\>@ads

Anyways thank you for quick replay nd i will try your code also.
