class Ckeditor::Hooks::PunditAuthorization
def authorized?(action, model_object = nil)
This takes the same arguments as +authorize+. The difference is that this will
has access to perform the action on a given model. It should return true when authorized.
This method is called primarily from the view to determine whether the given user
def authorized?(action, model_object = nil) Pundit.policy(@controller.current_user_for_pundit, model_object).public_send(action + '?') if action end