Forum: Ruby on Rails wrong number of arguments

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B04a553de1b8b45433b841bba440cc42?d=identicon&s=25 fafa (Guest)
on 2007-04-07 15:59
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...
B04a553de1b8b45433b841bba440cc42?d=identicon&s=25 fafa (Guest)
on 2007-04-07 17:03
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...
This topic is locked and can not be replied to.