if mappable is nil it causes an error
This commit is contained in:
parent
d1792d4fd7
commit
39562aad7e
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class MappingPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def show?
|
||||
map_policy.show? && mappable_policy.show?
|
||||
map_policy.show? && mappable_policy.try(:show?)
|
||||
end
|
||||
|
||||
def create?
|
||||
|
|
Loading…
Add table
Reference in a new issue