# Where to put data for a render partial rails

**URL:** <https://www.ruby-forum.com/t/where-to-put-data-for-a-render-partial-rails/77216>\
**Category:** Ruby\
**Created:** [November 25, 2006, 6:34am UTC](https://www.ruby-forum.com/t/where-to-put-data-for-a-render-partial-rails/77216 "2006-11-25T06:34:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawn\_bright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@shawn\_bright](https://www.ruby-forum.com/u/shawn_bright)\
**Post date:** [November 25, 2006, 6:34am UTC](https://www.ruby-forum.com/t/where-to-put-data-for-a-render-partial-rails/77216/1 "2006-11-25T06:34:20Z")

</div>

Hey there,  
i have a partial set aside for a xml based pie chart, i dont want to do  
the  
array building inside the rhtml file though because afik, it would  
violate  
mvc. So, if i do a  
\<%= render :partial =\> “pie\_chart” %\>  
where do i put the data manipulation function, and variables that i want  
to  
be displayed in the  
\_pie\_chart.rhtml ?

thanks

---

<div class="post-metadata">

**Author:** ![shawn\_bright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/838e76/32.png) [@shawn\_bright](https://www.ruby-forum.com/u/shawn_bright)\
**Post date:** [November 30, 2006, 1:34am UTC](https://www.ruby-forum.com/t/where-to-put-data-for-a-render-partial-rails/77216/2 "2006-11-30T01:34:04Z")

</div>

This would be better answered on the rails mailing list. My guess  
would be that the data manipulation functions would be in the  
controller. That’s what it’s there for.

Matt
