Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

return empty hash when no params given

  • Loading branch information...
commit 08cc4ce2e4cf015a6883af0e3d55377769d4d8a8 1 parent 59baa3b
Ivan Navarrete and Jonas Nicklas authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/trusted_attributes.rb
View
1  lib/trusted_attributes.rb
@@ -37,6 +37,7 @@ def trust(*attributes)
end
def attributes
+ return {} unless params[attributes_key]
# Be helpful and raise an exception when non trusted attributes are sent
unless Rails.env.production?
diff = params[attributes_key].keys.map(&:to_sym) - accessible_attributes
Please sign in to comment.
Something went wrong with that request. Please try again.