Changeset 73 for branches

Show
Ignore:
Timestamp:
08/18/2006 13:01:45 (2 years ago)
Author:
why
Message:
  • lib/markaby/builder.rb: content_for now adds to ActionView::Base.assigns so that content can go up into other layouts.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/xhtml-careful/lib/markaby/builder.rb

    r72 r73  
    136136    # If used several times, the variable will contain all the parts concatenated. 
    137137    def content_for(name, &block) 
    138       eval "@content_for_#{name} = (@content_for_#{name} || '') + capture(&block)" 
     138      @helpers.assigns["content_for_#{name}"] = 
     139        eval("@content_for_#{name} = (@content_for_#{name} || '') + capture(&block)") 
    139140    end 
    140141