Permalink
Browse files

defined? should actually work in current implementation

So this trick is not needed to be documented anymore.
  • Loading branch information...
1 parent d5be083 commit 3dfcae6afa24b641bd838b9044c5ce9aa2a1a6db @amatsuda amatsuda committed Aug 6, 2014
Showing with 0 additions and 9 deletions.
  1. +0 −9 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 <tt>defined? headline</tt> 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,

2 comments on commit 3dfcae6

@zzak
Member
zzak commented on 3dfcae6 Aug 6, 2014

👍 Nice find

@bughit
Contributor
bughit commented on 3dfcae6 Jan 23, 2015

could you point to the change in the code?

Please sign in to comment.