Safe attributes for repositories.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9876 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-06-19 19:47:54 +00:00
parent 3b854bee59
commit 585d08765e
4 changed files with 19 additions and 3 deletions
+5 -1
View File
@@ -31,7 +31,11 @@ module Redmine
def safe_attributes(*args)
@safe_attributes ||= []
if args.empty?
@safe_attributes
if superclass.include?(Redmine::SafeAttributes)
@safe_attributes + superclass.safe_attributes
else
@safe_attributes
end
else
options = args.last.is_a?(Hash) ? args.pop : {}
@safe_attributes << [args, options]