Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only copying over trusted attributes if they are defined

  • Loading branch information...
commit 008219e2862f835f3787c7129e61fb2130e915ee 1 parent 3cc297f
@ryanb authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/trusted_params/hash_additions.rb
View
2  lib/trusted_params/hash_additions.rb
@@ -30,7 +30,7 @@ class Hash
class HashWithIndifferentAccess
def dup_with_trusted_attributes
hash = dup_without_trusted_attributes
- hash.instance_variable_set("@trusted_attributes", instance_variable_get("@trusted_attributes"))
+ hash.instance_variable_set("@trusted_attributes", @trusted_attributes) if defined?(@trusted_attributes)
hash
end
alias_method_chain :dup, :trusted_attributes
Please sign in to comment.
Something went wrong with that request. Please try again.