# Wrong number of arguments

**URL:** <https://www.ruby-forum.com/t/wrong-number-of-arguments/91364>\
**Category:** Rails\
**Created:** [April 7, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments/91364 "2007-04-07T15:59:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/8e7dd6/32.png) [@fafa](https://www.ruby-forum.com/u/fafa)\
**Post date:** [April 7, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments/91364/1 "2007-04-07T15:59:05Z")

</div>

didnt somebody meet problem with wrong number of arguments? I have this  
in articles\_helper.rb : def menu\_page(id,zanoreni, previous, koren,  
mapa) and this in sitemap.rhtml: \<%= menu\_page(0, 0,’’, true, true) %\>.  
And this is the error message: wrong number of arguments (4 for 5)

I don’t understand it…

---

<div class="post-metadata">

**Author:** ![fafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/8e7dd6/32.png) [@fafa](https://www.ruby-forum.com/u/fafa)\
**Post date:** [April 7, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments/91364/2 "2007-04-07T17:03:09Z")

</div>

fafa wrote:

> didnt somebody meet problem with wrong number of arguments? I have this  
> in articles\_helper.rb : def menu\_page(id,zanoreni, previous, koren,  
> mapa) and this in sitemap.rhtml: \<%= menu\_page(0, 0,’’, true, true) %\>.  
> And this is the error message: wrong number of arguments (4 for 5)
> 
> I don’t understand it…

sorry, problem solved… menu\_page is recursive, and I forgot to add a  
new parameter in the recursive call in the body…
