# Wrong number of arguments (0 for 1)

**URL:** <https://www.ruby-forum.com/t/wrong-number-of-arguments-0-for-1/175634>\
**Category:** Rails\
**Created:** [September 16, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-0-for-1/175634 "2009-09-16T21:53:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RubyonRails\_newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Post date:** [September 16, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-0-for-1/175634/1 "2009-09-16T21:53:38Z")

</div>

Hi everyone,

I am running through the RailsSpace tutorial. I’m trying to figure out  
the advanced login section, which in short creates a cookie and an  
authorization token in the users table in the database.

My trouble is, I’m getting error: Wrong number of arguments (0 for 1)

the code that has been updated is as follows:

In ApplicationController:

before\_filter :check\_authorization

When I comment this line out, the application is displayed without  
error. Unfortunately i don’t know enough about rails to understand how  
to fix this. However without it, I can’t add the remember me  
functionality in the site…

Any ideas???

Many Thanks for reading.

---

<div class="post-metadata">

**Author:** ![RubyonRails\_newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Post date:** [September 16, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-0-for-1/175634/2 "2009-09-16T21:55:59Z")

</div>

On Sep 16, 8:05 pm, RubyonRails\_newbie [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> In ApplicationController:
> 
> before\_filter :check\_authorization

What does you check\_authorization method look like ? What’s the  
backtrace when you get that error ?

Fred

---

<div class="post-metadata">

**Author:** ![RubyonRails\_newbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/9d8465/32.png) [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Post date:** [September 16, 2009, 9:55pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-0-for-1/175634/3 "2009-09-16T21:55:59Z")

</div>

On Wed, Sep 16, 2009 at 2:05 PM, RubyonRails\_newbie  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> before\_filter :check\_authorization  
> What does the signature of this check\_authorization method look like?  
> Seems it’s expecting an argument you’re not sending.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
