Skip to content

Commit

Permalink
Go straight to the source, dont carry two internal params ivars aroun…
Browse files Browse the repository at this point in the history
…d, and allow you to set params to nil (used for testing)
  • Loading branch information
dhh committed Mar 21, 2012
1 parent 8b0835c commit fb661a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/action_controller/parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ module StrongParameters
end

def params
@_tainted_params ||= Parameters.new(super)
@_params ||= Parameters.new(request.parameters)
end

def params=(val)
@_tainted_params = Parameters.new(val)
@_params = val.is_a?(Hash) ? Parameters.new(val) : val
end
end
end
Expand Down

0 comments on commit fb661a2

Please sign in to comment.