Sha256: f777aa2bba2aac7869c35f06dc83932ad799e834f3c9ed24682830dc4cfb8862
Contents?: true
Size: 496 Bytes
Versions: 228
Compression:
Stored size: 496 Bytes
Contents
# frozen_string_literal: true module Motor module WrapIoParams extend ActiveSupport::Concern included do before_action :wrap_io_params, only: %i[update create] end private def wrap_io_params(hash = params) hash.each do |key, value| if key == 'io' hash[key] = StringIO.new(value.encode('ISO-8859-1')) elsif value.is_a?(ActionController::Parameters) wrap_io_params(value) end end hash end end end
Version data entries
228 entries across 228 versions & 7 rubygems