aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-12-09 13:15:40 +0100
committerJosé Valim <jose.valim@gmail.com>2010-12-09 13:15:40 +0100
commitcc70ac9508dff6a4406f446d7a53d05f6c7d9f61 (patch)
tree2437815d08262cfc07b2514ec96a30eee63e7428 /actionpack/lib/action_view/template.rb
parent28cf77203b0b5af648e441b5d9cfb75863ba2f39 (diff)
downloadrails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.tar.gz
rails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.tar.bz2
rails-cc70ac9508dff6a4406f446d7a53d05f6c7d9f61.zip
Properly check the arity for template handlers.
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r--actionpack/lib/action_view/template.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 831a19654e..0d8373ef14 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -275,7 +275,7 @@ module ActionView
end
arity = @handler.respond_to?(:arity) ? @handler.arity : @handler.method(:call).arity
- code = arity == 1 ? @handler.call(self) : @handler.call(self, view)
+ code = arity.abs == 1 ? @handler.call(self) : @handler.call(self, view)
# Make sure that the resulting String to be evalled is in the
# encoding of the code