Flowdock
method

get_typed_value

Importance_0
v2.0.0 - Show latest stable - 0 notes - Class: ActionController::AbstractRequest
get_typed_value(value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/request.rb, line 467
        def get_typed_value(value)
          case value
            when String
              value
            when NilClass
              ''
            when Array
              value.map { |v| get_typed_value(v) }
            else
              if value.is_a?(UploadedFile)
                # Uploaded file
                if value.original_filename
                  value
                # Multipart param
                else
                  result = value.read
                  value.rewind
                  result
                end
              # Unknown value, neither string nor multipart.
              else
                raise "Unknown form value: #{value.inspect}"
              end
          end
        end
Register or log in to add new notes.