From ae5325425942b0a3324910a461e69330054f9972 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Wed, 14 Nov 2012 20:29:28 +0100 Subject: [PATCH] Really remove Devises timeoutable... ... and force it to really remember the session by a hidden field. --- app/models/user.rb | 4 ++-- app/views/sessions/new.html.erb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index a26f6e6d9..c505e0bfa 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -18,8 +18,8 @@ class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, - :timeoutable, :token_authenticatable, :lockable, - :lock_strategy => :none, :unlock_strategy => :none + :token_authenticatable, :lockable, :lock_strategy => :none, + :unlock_strategy => :none before_validation :strip_and_downcase_username before_validation :set_current_language, :on => :create diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index a31d736b7..4a49fbf22 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -30,6 +30,7 @@ + <%= f.hidden_field :remember_me, :value => 1 %> <%= f.submit t('devise.sessions.new.sign_in'), :class => "new-btn" %> <% end %>