# How to params from a method to partial in rails

**URL:** <https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601>\
**Category:** Rails\
**Created:** [November 7, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601 "2009-11-07T14:41:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aashishkiran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@aashishkiran](https://www.ruby-forum.com/u/aashishkiran)\
**Post date:** [November 7, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601/1 "2009-11-07T14:41:10Z")

</div>

hi,  
can anyone tell how to pass params to a partial.

---

<div class="post-metadata">

**Author:** ![aashishkiran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@aashishkiran](https://www.ruby-forum.com/u/aashishkiran)\
**Post date:** [November 7, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601/2 "2009-11-07T14:52:24Z")

</div>

2009/11/7 Aashish K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ## hi, can anyone tell how to pass params to a partial.

As Leonardo M. pointed out in your other thread,

> **[Layouts and Rendering in Rails — Ruby on Rails Guides](https://guides.rubyonrails.org/layouts_and_rendering.html)**
>
> Layouts and Rendering in RailsThis guide covers the basic layout features of Action Controller and Action View.After reading this guide, you will know: How to use the various rendering methods built into Rails. How to create layouts with multiple...

should help.

I presume you have already worked through the Getting Started guide.  
ActiveRecord Relations is also compulsory reading. Also have a look  
at the railscasts.

Colin

---

<div class="post-metadata">

**Author:** ![aashishkiran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@aashishkiran](https://www.ruby-forum.com/u/aashishkiran)\
**Post date:** [November 7, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601/3 "2009-11-07T21:37:23Z")

</div>

render :partial =\> ‘some\_partial’, :locals =\> {:need\_in\_partial =\>  
@recived\_from\_controller}

2009/11/7 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![aashishkiran](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4da419/32.png) [@aashishkiran](https://www.ruby-forum.com/u/aashishkiran)\
**Post date:** [November 7, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/how-to-params-from-a-method-to-partial-in-rails/178601/4 "2009-11-07T21:38:16Z")

</div>

Colin L. wrote:

> 2009/11/7 Aashish K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > ## hi, can anyone tell how to pass params to a partial.
> 
> As Leonardo M. pointed out in your other thread,  
> [Layouts and Rendering in Rails — Ruby on Rails Guides](http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials)  
> should help.
> 
> I presume you have already worked through the Getting Started guide.  
> ActiveRecord Relations is also compulsory reading. Also have a look  
> at the railscasts.
> 
> Colin

thank you
