Sha256: 9dfda8b5171a92d9794e5c6dbe4e112e31a1688092f52de0562395abb18f5d96

Contents?: true

Size: 335 Bytes

Versions: 7

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

class UsersController < ApplicationController
  include Pundit

  def impersonate
    user = User.find(params[:id])
    authorize user
    impersonate_user(user)
    redirect_to root_path
  end

  def stop_impersonating
    stop_impersonating_user
    redirect_to(request.referer || root_path)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kowl-0.0.7 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.6 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.5 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.4 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.3 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.2 lib/kowl/templates/app/controllers/users_controller.rb
kowl-0.0.1 lib/kowl/templates/app/controllers/users_controller.rb