diff options
Diffstat (limited to 'activemodel/lib/active_model/serializers/xml.rb')
-rw-r--r-- | activemodel/lib/active_model/serializers/xml.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/serializers/xml.rb b/activemodel/lib/active_model/serializers/xml.rb index 76a0e54a56..8137300479 100644 --- a/activemodel/lib/active_model/serializers/xml.rb +++ b/activemodel/lib/active_model/serializers/xml.rb @@ -152,7 +152,11 @@ module ActiveModel def add_procs if procs = options.delete(:procs) [ *procs ].each do |proc| - proc.call(options) + if proc.arity > 1 + proc.call(options, @serializable) + else + proc.call(options) + end end end end |