push
travis-ci
1 of 1 new or added line in 1 file covered. (100.0%)
170 of 9354 relevant lines covered (1.82%)
0.02 hits per line
1 |
class SchoolPolicy < AuthenticatedPolicy |
× |
2 |
|
× |
3 |
class Scope < ApplicationPolicy::Scope |
× |
4 |
def resolve |
× |
5 |
if user.has_role?(:admin) |
× |
6 |
scope.all |
× |
7 |
else
|
× |
8 |
scope.none |
× |
9 |
end
|
× |
10 |
end
|
× |
11 |
end
|
× |
12 |
|
× |
13 |
def index? |
× |
14 |
user.has_role?(:admin)
|
× |
15 |
end
|
× |
16 |
|
× |
17 |
def manage? |
× |
18 |
user.has_role?(:admin)
|
× |
19 |
end
|
× |
20 |
|
× |
21 |
def inspect? |
× |
22 |
manage? |
× |
23 |
end
|
× |
24 |
|
× |
25 |
def show? |
× |
26 |
manage? |
× |
27 |
end
|
× |
28 |
end
|
× |
29 |
|
× |