summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/application_controller.rb6
-rw-r--r--db/migrate/20150706103229_truncate_sessions.rb9
2 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 8700317..9852736 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -12,12 +12,6 @@ class ApplicationController < ActionController::Base
def current_user
@current_user ||= session[:current_user]
-
- # Backward compatibility. Until 7.13 user session doesn't contain access_token
- # Users with old session should be logged out
- return nil if @current_user && @current_user.access_token.nil?
-
- @current_user
end
def sign_in(user)
diff --git a/db/migrate/20150706103229_truncate_sessions.rb b/db/migrate/20150706103229_truncate_sessions.rb
new file mode 100644
index 0000000..32fe651
--- /dev/null
+++ b/db/migrate/20150706103229_truncate_sessions.rb
@@ -0,0 +1,9 @@
+class TruncateSessions < ActiveRecord::Migration
+ def up
+ execute('DELETE FROM sessions')
+ end
+
+ def down
+ execute('DELETE FROM sessions')
+ end
+end