app/controllers/concerns/json_renderer.rb
# make sure we are not using sensitive/unsupported values or methods.
make sure we are not using sensitive/unsupported values or methods.
make sure we are not using sensitive / unsupported values or methods .
def validate_allowed(field, requested, allowed)
      forbidden = (requested - allowed.map(&:to_s))
      return if forbidden.empty?
      raise(
        JsonRenderer::ForbiddenIncludesError,
        "Forbidden #{field} [#{forbidden.join(",")}] found, allowed #{field} are [#{allowed.join(", ")}]"
      )
    end
def validate_allowed ( field , requested , allowed ) forbidden = ( requested - allowed . map ( & :to_s ) ) return if forbidden . empty? raise ( JsonRenderer :: ForbiddenIncludesError , "Forbidden #{field} [#{forbidden.join(",")}] found, allowed #{field} are [#{allowed.join(", ")}]" ) end
make sure we are not using sensitive/unsupported values or methods.
make sure we are not using sensitive / unsupported values or methods .
field
requested
allowed