<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *Edge*
 
+* Deprecated implicit local assignments when rendering partials [Josh Peek]
+
 * Introduce current_cycle helper method to return the current value without bumping the cycle.  #417 [Ken Collins]
 
 * Allow polymorphic_url helper to take url options. #880 [Tarmo T&#228;nav]</diff>
      <filename>actionpack/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -27,8 +27,14 @@ module ActionView
 
     def render_partial(view, object = nil, local_assigns = {}, as = nil)
       object ||= local_assigns[:object] ||
-        local_assigns[variable_name] ||
-        view.controller.instance_variable_get(&quot;@#{variable_name}&quot;) if view.respond_to?(:controller)
+        local_assigns[variable_name]
+
+      if view.respond_to?(:controller)
+        object ||= ActiveSupport::Deprecation::DeprecatedObjectProxy.new(
+          view.controller.instance_variable_get(&quot;@#{variable_name}&quot;),
+          &quot;@#{variable_name} will no longer be implicitly assigned to #{variable_name}&quot;
+        )
+      end
 
       # Ensure correct object is reassigned to other accessors
       local_assigns[:object] = local_assigns[variable_name] = object</diff>
      <filename>actionpack/lib/action_view/renderable_partial.rb</filename>
    </modified>
    <modified>
      <diff>@@ -832,8 +832,10 @@ EOS
   end
 
   def test_partial_with_implicit_local_assignment
-    get :partial_with_implicit_local_assignment
-    assert_equal &quot;Hello: Marcel&quot;, @response.body
+    assert_deprecated do
+      get :partial_with_implicit_local_assignment
+      assert_equal &quot;Hello: Marcel&quot;, @response.body
+    end
   end
 
   def test_render_missing_partial_template</diff>
      <filename>actionpack/test/controller/new_render_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -162,6 +162,22 @@ module ActiveSupport
         end
     end
 
+    class DeprecatedObjectProxy &lt; DeprecationProxy
+      def initialize(object, message)
+        @object = object
+        @message = message
+      end
+
+      private
+        def target
+          @object
+        end
+
+        def warn(callstack, called, args)
+          ActiveSupport::Deprecation.warn(@message, callstack)
+        end
+    end
+
     # Stand-in for &lt;tt&gt;@request&lt;/tt&gt;, &lt;tt&gt;@attributes&lt;/tt&gt;, &lt;tt&gt;@params&lt;/tt&gt;, etc.
     # which emits deprecation warnings on any method call (except +inspect+).
     class DeprecatedInstanceVariableProxy &lt; DeprecationProxy #:nodoc:</diff>
      <filename>activesupport/lib/active_support/deprecation.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8b6870cfae8d50a2ffd4f024d33d51aadaa6a6f7</id>
    </parent>
  </parents>
  <author>
    <name>Joshua Peek</name>
    <email>josh@joshpeek.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/acbf2b74aa3001fb6064bba96cd0033495774357</url>
  <id>acbf2b74aa3001fb6064bba96cd0033495774357</id>
  <committed-date>2008-08-28T08:37:46-07:00</committed-date>
  <authored-date>2008-08-28T08:37:46-07:00</authored-date>
  <message>Deprecated implicit local assignments when rendering partials</message>
  <tree>54bd7e783a063ddf359721eefd2a5566d12a9a0f</tree>
  <committer>
    <name>Joshua Peek</name>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
