alilloig
alilloig

Reputation: 466

RoR 3.2 devise (3.2.2) :timeoutable not working

After checking a few questions like:

rails 3.1, devise gem, :timeoutable is not working, why?

Devise - Timeout not working

devise config.timeout_in not working

How to configure time out using devise?

I have set my user model with :timeoutable

class User < ActiveRecord::Base
devise :rememberable, :demo_authenticatable, :api_authenticatable,:registerable,
:recoverable, :trackable, :validatable, :confirmable, :lockable, :timeoutable

And I have also uncomented the timeout_in line in the devise.rb file

config.timeout_in = 1.minutes

I also tryed setting the timeout_in property in the user model, but i keep beeing logged in

Any clues?

Thanks in advance, cheers!

Upvotes: 4

Views: 703

Answers (1)

Erica
Erica

Reputation: 221

If you're expecting it to present you with the login page when you refresh, remove the timeout part from your model and put it in devise.rb NOT development.rb & restart rails server. config.timeout_in = 1.hour

Upvotes: 2

Related Questions