avoid pundit error if no map specified with a mapping
This commit is contained in:
parent
d11f3923dd
commit
a05c7dc5fe
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class MappingPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def create?
|
||||
map_policy.update?
|
||||
record.map.present? && map_policy.update?
|
||||
end
|
||||
|
||||
def update?
|
||||
|
|
Loading…
Reference in a new issue