def is_authorized_for_action?
      action = params[:action].to_sym
      self.class.authorizable_config ||= DefaultConfig.config

      if !self.class.authorizable_config[action]
        action = Authorizable::Controller.alias_action(action)
      end

      # retrieve the settings for this particular controller action
      settings_for_action = self.class.authorizable_config[action]

      # continue with evaluation
      result = is_authorized_for_action_with_config?(action, settings_for_action)

      # if we are configured to raise exception instead of handle the error
      # ourselves, raise the exception!
      if Authorizable.configuration.raise_exception_on_denial? and !result
        raise Authorizable::Error::NotAuthorized.new(
          action: action,
          subject: params[:controller]
        )
      end

      result
    end
def is_authorized_for_action?
      action = params[:action].to_sym
      self.class.authorizable_config ||= DefaultConfig.config

      if !self.class.authorizable_config[action]
        action = Authorizable::Controller.alias_action(action)
      end

      # retrieve the settings for this particular controller action
      settings_for_action = self.class.authorizable_config[action]

      # continue with evaluation
      result = is_authorized_for_action_with_config?(action, settings_for_action)

      # if we are configured to raise exception instead of handle the error
      # ourselves, raise the exception!
      if Authorizable.configuration.raise_exception_on_denial? and !result
        raise Authorizable::Error::NotAuthorized.new(
          action: action,
          subject: params[:controller]
        )
      end

      result
    end
check if the resource can perform the action

 @raise [Authorizable::Error::NotAuthorized] if configured to raise
   exception instead of handle the errors
 @return [Boolean] the result of the permission evaluation
  will halt controller flow