# Before\_filter exception being ignored

**URL:** <https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115>\
**Category:** Rails\
**Created:** [June 15, 2010, 5:59pm UTC](https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115 "2010-06-15T17:59:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [June 15, 2010, 5:59pm UTC](https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115/1 "2010-06-15T17:59:01Z")

</div>

I am, as stated in the subject, having an issue with a before\_filter  
exception being ignored by the application.

My Customer Controller:

[http://pastie.org/1005487](http://pastie.org/1005487)

My Application Controller:

[http://pastie.org/1005490](http://pastie.org/1005490)

I have a link to a forgotten\_password action that, when clicked, gets  
redirected back to the customers/login page with an authorization error.  
Obviously, this is not what I want.

Can anyone help me out with this? I am, obviously, missing something.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [June 15, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115/2 "2010-06-15T18:50:56Z")

</div>

Pale H. wrote:

> I am, as stated in the subject, having an issue with a before\_filter  
> exception being ignored by the application.
> 
> My Customer Controller:
> 
> [http://pastie.org/1005487](http://pastie.org/1005487)
> 
> My Application Controller:
> 
> [http://pastie.org/1005490](http://pastie.org/1005490)
> 
> I have a link to a forgotten\_password action that, when clicked, gets  
> redirected back to the customers/login page with an authorization error.  
> Obviously, this is not what I want.
> 
> Can anyone help me out with this? I am, obviously, missing something.

Hello,

Could we have a look on your.rhtml, to make sur that the action that is  
triggered by the link is the good one ?

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [June 16, 2010, 9:58am UTC](https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115/3 "2010-06-16T09:58:39Z")

</div>

Mamadou TourÃ© wrote:

> Hello,
> 
> Could we have a look on your .rhtml, to make sure that the action that is  
> triggered by the link is the good one ?

customers/forgotten\_password.html.erb: [http://pastie.org/1006510](http://pastie.org/1006510)

customer\_sessions/new.html.erb: [http://pastie.org/1006513](http://pastie.org/1006513)

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [June 16, 2010, 11:34am UTC](https://www.ruby-forum.com/t/before-filter-exception-being-ignored/190115/4 "2010-06-16T11:34:58Z")

</div>

The problem was that customer resource map in my routes file had no  
:only option specified. Problem solved.
