aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-11-21 03:30:06 +0100
committerXavier Noria <fxn@hashref.com>2010-11-21 03:30:06 +0100
commit6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52 (patch)
tree96bd668692b62d3829322232877b70c9011ce446 /actionpack/lib/action_view/template.rb
parentf326221c701e4f9d991e3eadcc793a73795fb218 (diff)
parent7c51d1fcf9dc504c2dfd6e7184bbe8186f09819d (diff)
downloadrails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.tar.gz
rails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.tar.bz2
rails-6af08ab6d835d1c2aa8648a0d3a4a86e678c3f52.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r--actionpack/lib/action_view/template.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index dbb1532cd4..6c6d659246 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -269,7 +269,8 @@ module ActionView
end
end
- code = @handler.call(self)
+ arity = @handler.respond_to?(:arity) ? @handler.arity : @handler.method(:call).arity
+ code = arity == 1 ? @handler.call(self) : @handler.call(self, view)
# Make sure that the resulting String to be evalled is in the
# encoding of the code