diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-01-14 16:48:37 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-01-14 16:48:57 -0800 |
commit | b8fadd708b9850a77e1f64038763fffcff502499 (patch) | |
tree | 4f20197c55e98b256ebbf126cbcf05636a9f511c /actionpack/lib/action_controller/rewindable_input.rb | |
parent | f65333a4cfcdc73b2f2e51fc4353370ab308135e (diff) | |
parent | 9bcf01b23c25e640da7908ac8b1b49fbf7d2e51a (diff) | |
download | rails-b8fadd708b9850a77e1f64038763fffcff502499.tar.gz rails-b8fadd708b9850a77e1f64038763fffcff502499.tar.bz2 rails-b8fadd708b9850a77e1f64038763fffcff502499.zip |
Sync 'rails/rails/master'
Diffstat (limited to 'actionpack/lib/action_controller/rewindable_input.rb')
-rw-r--r-- | actionpack/lib/action_controller/rewindable_input.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/rewindable_input.rb b/actionpack/lib/action_controller/rewindable_input.rb index 296d8aed22..058453ea68 100644 --- a/actionpack/lib/action_controller/rewindable_input.rb +++ b/actionpack/lib/action_controller/rewindable_input.rb @@ -15,15 +15,19 @@ module ActionController @io.rewind end + def string + @string + end + def method_missing(method, *args, &block) @io.send(method, *args, &block) end private def read_original_io - unless @str - @str = @io.read - @io = StringIO.new(@str) + unless @string + @string = @io.read + @io = StringIO.new(@string) end end end |