We were only defining the Punditize
module if we had already defined Pundit
. Setting Punditize
like this broke autoloading in Rails when Pundit
was not specified. We fixed the problem by always setting Punditize
but keeping it empty if Pundit
does not exist.