class Ckeditor::Hooks::CanCanAuthorization

def authorized?(action, model_object = nil)

return a boolean whereas +authorize+ will raise an exception when not authorized.
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)
  @controller.current_ability.can?(action.to_sym, model_object) if action
end