Changeset 1078

Show
Ignore:
Timestamp:
12/10/07 15:13:26 (1 year ago)
Author:
e.@brainspl.at
Message:

fix caching of @_buffer in render, form_for closes #350, thanks yerejm

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/mixins/erubis_capture.rb

    r436 r1078  
    77    # Provides direct acccess to the buffer for this view context 
    88    def _buffer( the_binding ) 
    9       @_buffer ||= eval( "_buf", the_binding ) 
     9      @_buffer = eval( "_buf", the_binding ) 
    1010    end 
    1111     
  • trunk/lib/merb/template/haml.rb

    r1032 r1078  
    1010     
    1111    def _buffer( binding ) 
    12       @_buffer ||= eval( "_erbout", binding ) 
     12      @_buffer = eval( "_erbout", binding ) 
    1313    end 
    1414 
  • trunk/spec/merb/render_spec.rb

    r1014 r1078  
    109109  end 
    110110 
     111  it "should bind the concat to independent render buffers" do 
     112    c = new_controller 
     113    content = c.render :template => "template_views/interface_concat_#{@engine}", :layout => :none 
     114    content.should match( /Start Tester Block\s*In Tester Block\s*Finish Tester Block/m) 
     115    content = c.render :template => "template_views/interface_concat_#{@engine}", :layout => :none 
     116    content.should match( /Start Tester Block\s*In Tester Block\s*Finish Tester Block/m) 
     117  end 
     118   
    111119  it "should implement a capture( &block ) method" do 
    112120    c = new_controller