def params_for_action
      return {} if action_name == 'destroy'

      key = _options[:model_params_key]
      # model_class should be a class
      klass = _options[:model_class]

      model_key =
        if key.present?
          key
        elsif klass
          klass.name.underscore
        else
          _lookup.model_name.underscore
        end

      params_lookups = [
        # e.g.: create_post_params
        "#{action_name}_#{model_key}_params",
        # generic for action
        "#{action_name}_params",
        # e.g.: post_params
        "#{model_key}_params",
        # most generic
        'resource_params'
      ]

      lookup_params_for_action(params_lookups)
    end
def params_for_action
      return {} if action_name == 'destroy'

      key = _options[:model_params_key]
      # model_class should be a class
      klass = _options[:model_class]

      model_key =
        if key.present?
          key
        elsif klass
          klass.name.underscore
        else
          _lookup.model_name.underscore
        end

      params_lookups = [
        # e.g.: create_post_params
        "#{action_name}_#{model_key}_params",
        # generic for action
        "#{action_name}_params",
        # e.g.: post_params
        "#{model_key}_params",
        # most generic
        'resource_params'
      ]

      lookup_params_for_action(params_lookups)
    end
In order of most specific, to least specific:
 - {action}_{model_name}_params
 - {action}_params
 - {model_key}_params
 - resource_params
 - params

 It's recommended to use whitelisted strong parameters on
 actions such as create and update

 @return the whitelisted strong parameters object