lib/generators/authentication/templates/controllers/html/masquerades_controller.rb.tt in authentication-zero-2.16.28 vs lib/generators/authentication/templates/controllers/html/masquerades_controller.rb.tt in authentication-zero-2.16.29
- old
+ new
@@ -1,11 +1,11 @@
class MasqueradesController < ApplicationController
before_action :authorize
before_action :set_user
def create
- session = @user.sessions.create!
- cookies.signed.permanent[:session_token] = { value: session.id, httponly: true }
+ session_record = @user.sessions.create!
+ cookies.signed.permanent[:session_token] = { value: session_record.id, httponly: true }
redirect_to root_path, notice: "Signed in successfully"
end
private