Skip to content

Commit

Permalink
defined? should actually work in current implementation
Browse files Browse the repository at this point in the history
So this trick is not needed to be documented anymore.
  • Loading branch information
amatsuda committed Aug 6, 2014
1 parent d5be083 commit 3dfcae6
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions actionview/lib/action_view/base.rb
Expand Up @@ -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,
Expand Down

2 comments on commit 3dfcae6

@zzak
Copy link
Member

@zzak zzak commented on 3dfcae6 Aug 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Nice find

@bughit
Copy link
Contributor

@bughit bughit commented on 3dfcae6 Jan 23, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you point to the change in the code?

Please sign in to comment.