Skip to content

Commit 81919db

Browse files
committed
Make Upload Progress work with edge Rails [4388] and higher, retain compatibility to earlier builds
1 parent ca4c2d7 commit 81919db

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*SVN*
22

3+
* Make Upload Progress work with edge Rails [4388] and higher, retain compatibility to earlier builds
4+
35
* Make Upload Progress work with edge Rails [3526] and higher, retain compatibility to earlier builds

lib/multipart_progress.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ def read_multipart_with_progress(boundary, content_length)
158158
end
159159
params
160160
end
161+
162+
# Required because of changes in [4388]
163+
unless private_instance_methods.include?("read_params_from_query")
164+
def read_params_from_query
165+
read_params(:get,nil)
166+
end
167+
end
161168

162169
# Prevent redefinition of aliases on multiple includes
163170
unless private_instance_methods.include?("read_multipart_without_progress")
@@ -166,4 +173,4 @@ def read_multipart_with_progress(boundary, content_length)
166173
end
167174

168175
end
169-
end
176+
end

0 commit comments

Comments
 (0)