From 3dfcae6afa24b641bd838b9044c5ce9aa2a1a6db Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Thu, 7 Aug 2014 01:57:55 +0900 Subject: defined? should actually work in current implementation So this trick is not needed to be documented anymore. --- actionview/lib/action_view/base.rb | 9 --------- 1 file changed, 9 deletions(-) (limited to 'actionview/lib/action_view/base.rb') diff --git a/actionview/lib/action_view/base.rb b/actionview/lib/action_view/base.rb index 900f96255e..86c55ffb51 100644 --- a/actionview/lib/action_view/base.rb +++ b/actionview/lib/action_view/base.rb @@ -66,15 +66,6 @@ module ActionView #:nodoc: # Headline: <%= headline %> # First name: <%= person.first_name %> # - # If you need to find out whether a certain local variable has been assigned a value in a particular render call, - # you need to use the following pattern: - # - # <% if local_assigns.has_key? :headline %> - # Headline: <%= headline %> - # <% end %> - # - # Testing using defined? headline will not work. This is an implementation restriction. - # # === Template caching # # By default, Rails will compile each template to a method in order to render it. When you alter a template, -- cgit v1.2.3