# recursive ruby function in rhtml

**URL:** <https://discuss.rubyonrails.org/t/recursive-ruby-function-in-rhtml/23488>\
**Category:** rubyonrails-talk\
**Created:** [January 19, 2008, 12:25am UTC](https://discuss.rubyonrails.org/t/recursive-ruby-function-in-rhtml/23488 "2008-01-19T00:25:16Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [January 19, 2008, 12:25am UTC](https://discuss.rubyonrails.org/t/recursive-ruby-function-in-rhtml/23488/1 "2008-01-19T00:25:16Z")

</div>

preferably you would use a helper method or a partial.

just have the method/partial try and render itself within itself until the base case is reached
