# File lib/merb-param-protection.rb, line 145 def restrict_params(obj, attrs = []) # Make sure the params for the object exists unless params[obj].nil? attrs = attrs.collect {|a| a.to_s} trashed_params_keys = params[obj].keys - attrs # Store a hash of the key/value pairs we are going # to remove in case we need them later. Lighthouse Bug # 105 @trashed_params = {} trashed_params_keys.each do |key| @trashed_params.merge!({key => params[obj][key]}) end remove_params_from_object(obj, trashed_params_keys) end end