Sha256: c1e67af3accbc17c42f4562e1fff83cdef244f5bda5ac22188a1c85729f5a6d9
Contents?: true
Size: 823 Bytes
Versions: 13
Compression:
Stored size: 823 Bytes
Contents
class UsersController < ApplicationController prepend_before_action :current_user, only: :exhibit before_action :authenticate_user!, except: [:accept, :exhibit] respond_to :html, :xml def index user_session[:cart] = "Cart" respond_with(current_user) end def edit_form user_session['last_request_at'] = params.fetch(:last_request_at, 31.minutes.ago.utc) end def update_form render (Devise.rails5? ? :body : :text) => 'Update' end def accept @current_user = current_user end def exhibit render (Devise.rails5? ? :body : :text) => current_user ? "User is authenticated" : "User is not authenticated" end def expire user_session['last_request_at'] = 31.minutes.ago.utc render (Devise.rails5? ? :body : :text) => 'User will be expired on next request' end end
Version data entries
13 entries across 13 versions & 4 rubygems