<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>actionpack/test/template/deprecate_ivars_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -157,6 +157,8 @@ module ActionView #:nodoc:
     attr_reader :logger, :response, :headers
     attr_internal :cookies, :flash, :headers, :params, :request, :response, :session
     
+    delegate :logger, :action_name, :to =&gt; :controller
+    
     attr_writer :template_format
 
     # Specify trim mode for the ERB compiler. Defaults to '-'.
@@ -524,10 +526,18 @@ If you are rendering a subtemplate, you must now use controller-like partial syn
       def template_handler_is_compilable?(handler)
         handler.new(self).respond_to?(:compile)
       end
-
+      
       # Assigns instance variables from the controller to the view.
       def assign_variables_from_controller
-        @assigns.each { |key, value| instance_variable_set(&quot;@#{key}&quot;, value) }
+        @assigns.each do |key, value|
+          if ['logger'].include?(key)
+            instance_variable_set(&quot;@#{key}&quot;, ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, key.to_sym))
+          elsif ['action_name'].include?(key)
+            instance_variable_set(&quot;@#{key}&quot;, ActiveSupport::Deprecation::DeprecatedInstanceVariable.new(value, key))
+          else
+            instance_variable_set(&quot;@#{key}&quot;, value)
+          end
+        end
       end
 
 </diff>
      <filename>actionpack/lib/action_view/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require 'yaml'
+require 'delegate'
 
 module ActiveSupport
   module Deprecation #:nodoc:
@@ -175,6 +176,20 @@ module ActiveSupport
           ActiveSupport::Deprecation.warn(&quot;#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}&quot;, callstack)
         end
     end
+    
+    class DeprecatedInstanceVariable &lt; Delegator
+      def initialize(value, method)
+        super(value)
+        @method = method
+        @value = value
+      end
+
+      def __getobj__
+        ActiveSupport::Deprecation.warn(&quot;Instance variable @#{@method} is deprecated! Call instance method #{@method} instead.&quot;)
+        @value
+      end
+    end
+    
   end
 end
 </diff>
      <filename>activesupport/lib/active_support/deprecation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 require File.dirname(__FILE__) + '/abstract_unit'
 
 class Deprecatee
+  
   def initialize
     @request = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(self, :request)
     @_request = 'there we go'
@@ -148,4 +149,15 @@ class DeprecationTest &lt; Test::Unit::TestCase
     assert_not_deprecated { error.message }
     assert_nil @last_message
   end
+  
+end
+
+class DeprecatedIvarTest &lt; Test::Unit::TestCase
+  
+  def test_deprecated_ivar
+    @action = ActiveSupport::Deprecation::DeprecatedInstanceVariable.new(&quot;fubar&quot;, :foobar)
+    
+    assert_deprecated(/Instance variable @foobar is deprecated! Call instance method foobar instead/) { assert_equal &quot;fubar&quot;, @action }
+  end
+  
 end</diff>
      <filename>activesupport/test/deprecation_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c96f509a8e630bcd0a79916ae7aadfe919b49a5</id>
    </parent>
  </parents>
  <author>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/63edc022f12713b1ac170331a1b619fbcc064d5a</url>
  <id>63edc022f12713b1ac170331a1b619fbcc064d5a</id>
  <committed-date>2008-05-06T03:43:33-07:00</committed-date>
  <authored-date>2008-05-06T03:35:35-07:00</authored-date>
  <message>Deprecate ivars in view.

Deprecate use of @logger and @action_name instance variables inside
views. Please use instance methods logger and action_name instead.</message>
  <tree>5e00b9960ba048d4864bb795756d62e322702c55</tree>
  <committer>
    <name>Pratik Naik</name>
    <email>pratiknaik@gmail.com</email>
  </committer>
</commit>
