On Tuesday 09 December 2008 12:03:55 Davi Vidal wrote:
> On Tuesday 09 December 2008 10:49:24 Sulekha Mariam wrote:
> > Sulekha Mariam wrote:
>
> [...]
>
> > > def tag_cloud
>
> [...]
>
> > now i am getting the error
> >
> > Showing stories/index.html.erb where line #4 raised:
> >
> > wrong number of arguments (2 for 0)
>
> Your method accepts no argument. Try something like:
>
> def tag_cloud(args*)
>
irb(main):001:0> def foo(*args)
irb(main):002:1> puts args
irb(main):003:1> end
=> nil
irb(main):004:0> foo "hello"
hello
=> nil
irb(main):005:0> foo "hello", "world"
hello
world
=> nil
irb(main):006:0> foo "hello", "world", "I'm alive"
hello
world
I'm alive
=> nil
HTH,
--
Davi Vidal
--
E-mail: davividal arroba siscompar ponto com ponto br
MSN : davividal arroba msn ponto com
GTalk : davividal arroba gmail ponto com
Skype : davividal
YIM : davi_vidal
ICQ : 138815296
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---