avoid pundit error if no map specified with a mapping

This commit is contained in:
Devin Howard 2016-03-14 14:37:01 +08:00
parent d11f3923dd
commit a05c7dc5fe

View file

@ -20,7 +20,7 @@ class MappingPolicy < ApplicationPolicy
end end
def create? def create?
map_policy.update? record.map.present? && map_policy.update?
end end
def update? def update?