aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-01-23 07:57:30 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-01-23 08:09:32 -0200
commit930245ef12fbbb0628c332d36bf09a33050d5b65 (patch)
tree65108613c06a978169ef0a222473ab9606203627 /actionpack/lib
parentfcfe1fa87813bf85697c7a0db519e8ed9a483fc6 (diff)
downloadrails-930245ef12fbbb0628c332d36bf09a33050d5b65.tar.gz
rails-930245ef12fbbb0628c332d36bf09a33050d5b65.tar.bz2
rails-930245ef12fbbb0628c332d36bf09a33050d5b65.zip
Raise a better error if anyone wants to create your own ActionView::Helpers::Tags::Base child and do not implement the render method
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/helpers/tags/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/base.rb b/actionpack/lib/action_view/helpers/tags/base.rb
index 24956beb9c..449f94d347 100644
--- a/actionpack/lib/action_view/helpers/tags/base.rb
+++ b/actionpack/lib/action_view/helpers/tags/base.rb
@@ -19,8 +19,9 @@ module ActionView
@auto_index = retrieve_autoindex(Regexp.last_match.pre_match) if Regexp.last_match
end
- def render(&block)
- raise "Abstract Method called"
+ # This is what child classes implement.
+ def render
+ raise NotImplementedError, "Subclasses must implement a render method"
end
private