Permalink
Browse files

defined? should actually work in current implementation

So this trick is not needed to be documented anymore.
  • Loading branch information...
amatsuda committed Aug 6, 2014
1 parent d5be083 commit 3dfcae6afa24b641bd838b9044c5ce9aa2a1a6db
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

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Aug 6, 2014

Member

👍 Nice find

Member

zzak replied Aug 6, 2014

👍 Nice find

@bughit

This comment has been minimized.

Show comment
Hide comment
@bughit

bughit Jan 23, 2015

Contributor

could you point to the change in the code?

Contributor

bughit replied Jan 23, 2015

could you point to the change in the code?

Please sign in to comment.