This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Rewrote ActionController::Parameters#dup without Marshal.dump as it w…

…as preventing correct dup of File objects.
  • Loading branch information...
1 parent 5199f84 commit 176893429801325e4f8d6bd0cce253a55ab9fb83 @Flink Flink committed Mar 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/action_controller/parameters.rb
@@ -73,7 +73,9 @@ def slice(*keys)
end
def dup
- Marshal.load Marshal.dump self
+ super.tap do |duplicate|
+ duplicate.instance_variable_set :@permitted, @permitted
+ end
end
private

0 comments on commit 1768934

Please sign in to comment.