travis-ci
6514 of 7709 relevant lines covered (84.5%)
314.87 hits per line
1 |
# frozen_string_literal: true
|
× |
2 |
class User::MasqueradesController < Devise::MasqueradesController |
1 only 2.3.1, GROUP=1 ✔ |
3 |
before_action :load_and_authorize_user, except: [:back] |
1 only 2.3.1, GROUP=1 ✔ |
4 |
|
× |
5 |
private |
1 only 2.3.1, GROUP=1 ✔ |
6 |
|
× |
7 |
def id_param |
1 only 2.3.1, GROUP=1 ✔ |
8 |
params.permit(:id)[:id] |
3 only 2.3.1, GROUP=1 ✔ |
9 |
end
|
× |
10 |
|
× |
11 |
def load_and_authorize_user |
1 only 2.3.1, GROUP=1 ✔ |
12 |
@user = User.find(id_param) |
3 only 2.3.1, GROUP=1 ✔ |
13 |
authorize!(:masquerade, @user) |
3 only 2.3.1, GROUP=1 ✔ |
14 |
end
|
× |
15 |
end
|
× |