Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #4632: render_component_integration_test.patch

File render_component_integration_test.patch, 0.8 kB (added by dev.rubyonrails@maxdunn.com, 3 years ago)
  • vendor/rails/actionpack/lib/action_controller/integration.rb

    old new  
    324324        def clear_last_instantiation! 
    325325          self.last_instantiation = nil 
    326326        end 
    327      
     327 
    328328        def new_with_capture(*args) 
    329           self.last_instantiation ||= new_without_capture(*args) 
     329          if last_instantiation and self == last_instantiation.class  
     330            last_instantiation 
     331          else             
     332            self.last_instantiation = new_without_capture(*args) 
     333          end 
    330334        end 
    331335      end 
    332336    end