# 2008 New Year Log-in problem?

**URL:** <https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728>\
**Category:** Rails\
**Created:** [January 1, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728 "2008-01-01T22:14:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/u/Jon_Phillips_S_Stas)\
**Post date:** [January 1, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728/1 "2008-01-01T22:14:02Z")

</div>

Hey guys,

I really appreciate the help; I’m a relative Rails newbie who has  
been managing the application after our main developer moved on.  
Everything has been working fine until today, Jan 1, 2008, when our  
users can’t log on.

Authentication seems to work. In our account controller, we’ve got  
code directing them to /home/myhome if they login successfully:

```
   if session[:user] = User.authenticate(params[:user_login],

```

params[:user\_password])  
flash[‘notice’] = “Login successful”  
redirect\_back\_or\_default ‘/home/myhome’

They are redirected to home/myhome successfully. However the home  
controller has a before\_filter :login\_required, :only =\> [:myhome]  
and the user is immediately directed to the sign up page.

The log files go like:

[PASSING LOG IN PARAMETERS PART SNIPPED HERE]  
Redirected to [http://localhost:3000/home/myhome](http://localhost:3000/home/myhome)  
Completed in 0.02047 (48 reqs/sec) | DB: 0.00981 (47%) | 302 Found  
[[http://localhost/account/login](http://localhost/account/login)]

Processing HomeController#myhome (for 127.0.0.1 at 2008-01-01  
16:03:26) [GET]  
Session ID: 935f6485621d1924a2e9027b9cd4601b  
Parameters: {“action”=\>“myhome”, “controller”=\>“home”}  
Redirected to [http://localhost:3000/account/signup](http://localhost:3000/account/signup)  
Filter chain halted as  
[#\<ActionController::Filters::ClassMethods::SymbolFilter:0x32f4754  
@filter=:login\_required\>] returned false.  
Completed in 0.00039 (2590 reqs/sec) | DB: 0.00000 (0%) | 302 Found  
[[http://localhost/home/myhome](http://localhost/home/myhome)]

Any ideas why this wouldn’t be working in 2008? Thanks very much!

Jon

Jon Phillips | Stashmatic  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/u/Jon_Phillips_S_Stas)\
**Post date:** [January 1, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728/2 "2008-01-01T22:18:43Z")

</div>

You asked for ‘any ideas’.

Was the main developer fired? Anyway, has he made it known he is  
available for expensive contract work? Are there any references to  
Time or Date anywhere in the code that aren’t perfectly  
straightforward?

Good Luck,

f

---

<div class="post-metadata">

**Author:** ![Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/u/Jon_Phillips_S_Stas)\
**Post date:** [January 1, 2008, 10:31pm UTC](https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728/3 "2008-01-01T22:31:37Z")

</div>

Authentication might not be working as well as you think. You appear  
to have a before\_filter on your home page and it’s returning false  
(probably failed authentication).

---

<div class="post-metadata">

**Author:** ![Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eb9ed0/32.png) [@Jon\_Phillips\_S\_Stas](https://www.ruby-forum.com/u/Jon_Phillips_S_Stas)\
**Post date:** [January 1, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/2008-new-year-log-in-problem/124728/4 "2008-01-01T22:35:48Z")

</div>

On Jan 1, 2008, at 10:13 PM, Jon Phillips | Stashmatic wrote:

> I really appreciate the help; I’m a relative Rails newbie who has  
> been managing the application after our main developer moved on.  
> Everything has been working fine until today, Jan 1, 2008, when our  
> users can’t log on.
> 
> Authentication seems to work. In our account controller, we’ve got  
> code directing them to /home/myhome if they login successfully:
> 
> ```
> if session[:user] = User.authenticate(params[:user_login],  
> 
> ```
> 
> params[:user\_password])

Hmmmm… is the applicaction using acts\_as\_authenticated?

– fxn
