push
circleci
5 of 5 new or added lines in 2 files covered. (100.0%)
688 of 810 relevant lines covered (84.94%)
5.68 hits per line
1 |
class PlacePolicy < ApplicationPolicy |
1✔ |
2 |
def index? |
1✔ |
3 |
true
|
1✔ |
4 |
end
|
|
5 |
|
|
6 |
def show? |
1✔ |
7 |
true
|
× |
8 |
end
|
|
9 |
|
|
10 |
def create? |
1✔ |
11 |
user.try(:has_role?, 'Librarian') |
× |
12 |
end
|
|
13 |
|
|
14 |
def update? |
1✔ |
15 |
user.try(:has_role?, 'Librarian') |
× |
16 |
end
|
|
17 |
|
|
18 |
def destroy? |
1✔ |
19 |
user.try(:has_role?, 'Librarian') |
× |
20 |
end
|
|
21 |
end
|