Sha256: a79337f4a6b132db9b994c660bf5aefdd57c964ed17cab86079acb167dfe8c61
Contents?: true
Size: 476 Bytes
Versions: 11
Compression:
Stored size: 476 Bytes
Contents
require "webpacker/helper" module CmAdmin module ApplicationHelper include ::Webpacker::Helper def current_webpacker_instance CmAdmin.webpacker end # Allow if policy is not defined. def has_valid_policy(model_name, action_name) return true unless policy([:cm_admin, model_name.classify.constantize]).methods.include?(:"#{action_name}?") policy([:cm_admin, model_name.classify.constantize]).send(:"#{action_name}?") end end end
Version data entries
11 entries across 11 versions & 1 rubygems