public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Don't pass block binding to concat
jeremy (author)
Mon Jun 02 13:49:14 -0700 2008
commit  4d4c8e298f5396e6b8ace0a10d7f991594aace2d
tree    2a5d4704d307ff2469de6226c9c2fbb691e75e32
parent  0bdb7d353b4ac6f5470884360f9a480a16bd709c
...
257
258
259
260
 
261
262
263
...
257
258
259
 
260
261
262
263
0
@@ -257,7 +257,7 @@ If you are rendering a subtemplate, you must now use controller-like partial syn
0
         if partial_layout = options.delete(:layout)
0
           if block_given?
0
             wrap_content_for_layout capture(&block) do
0
- concat(render(options.merge(:partial => partial_layout)), block.binding)
0
+ concat(render(options.merge(:partial => partial_layout)))
0
             end
0
           else
0
             wrap_content_for_layout render(options) do
...
249
250
251
252
 
253
254
 
255
256
257
...
249
250
251
 
252
253
 
254
255
256
257
0
@@ -249,9 +249,9 @@ module ActionView
0
           args.unshift object
0
         end
0
 
0
- concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {}), proc.binding)
0
+ concat(form_tag(options.delete(:url) || {}, options.delete(:html) || {}))
0
         fields_for(object_name, *(args << options), &proc)
0
- concat('</form>', proc.binding)
0
+ concat('</form>')
0
       end
0
 
0
       def apply_form_for_options!(object_or_array, options) #:nodoc:
...
407
408
409
410
411
412
413
 
 
 
 
414
415
416
...
442
443
444
445
446
447
 
 
 
448
449
450
...
407
408
409
 
 
 
 
410
411
412
413
414
415
416
...
442
443
444
 
 
 
445
446
447
448
449
450
0
@@ -407,10 +407,10 @@ module ActionView
0
       # # => <fieldset><legend>Your details</legend><p><input id="name" name="name" type="text" /></p></fieldset>
0
       def field_set_tag(legend = nil, &block)
0
         content = capture(&block)
0
- concat(tag(:fieldset, {}, true), block.binding)
0
- concat(content_tag(:legend, legend), block.binding) unless legend.blank?
0
- concat(content, block.binding)
0
- concat("</fieldset>", block.binding)
0
+ concat(tag(:fieldset, {}, true))
0
+ concat(content_tag(:legend, legend)) unless legend.blank?
0
+ concat(content)
0
+ concat("</fieldset>")
0
       end
0
       
0
       private
0
@@ -442,9 +442,9 @@ module ActionView
0
         
0
         def form_tag_in_block(html_options, &block)
0
           content = capture(&block)
0
- concat(form_tag_html(html_options), block.binding)
0
- concat(content, block.binding)
0
- concat("</form>", block.binding)
0
+ concat(form_tag_html(html_options))
0
+ concat(content)
0
+ concat("</form>")
0
         end
0
 
0
         def token_tag
...
179
180
181
182
183
184
185
186
187
188
 
189
190
191
...
179
180
181
 
 
 
 
 
 
 
182
183
184
185
0
@@ -179,13 +179,7 @@ module ActionView
0
           content = content_or_options_with_block
0
         end
0
 
0
- javascript_tag = content_tag("script", javascript_cdata_section(content), html_options.merge(:type => Mime::JS))
0
-
0
- if block_given? && block_is_within_action_view?(block)
0
- concat(javascript_tag, block.binding)
0
- else
0
- javascript_tag
0
- end
0
+ concat(content_tag("script", javascript_cdata_section(content), html_options.merge(:type => Mime::JS)))
0
       end
0
 
0
       def javascript_cdata_section(content) #:nodoc:
...
382
383
384
385
 
386
387
 
388
389
390
...
382
383
384
 
385
386
 
387
388
389
390
0
@@ -382,9 +382,9 @@ module ActionView
0
           args.unshift object
0
         end
0
 
0
- concat(form_remote_tag(options), proc.binding)
0
+ concat(form_remote_tag(options))
0
         fields_for(object_name, *(args << options), &proc)
0
- concat('</form>', proc.binding)
0
+ concat('</form>')
0
       end
0
       alias_method :form_remote_for, :remote_form_for
0
       
...
51
52
53
54
55
 
56
57
58
59
60
 
...
51
52
53
 
 
54
55
56
57
 
58
59
0
@@ -51,9 +51,8 @@ module ActionView
0
         prefix = args.first.is_a?(Hash) ? nil : args.shift
0
         options = args.first.is_a?(Hash) ? args.shift : {}
0
         concat content_tag(tag_name, capture(&block),
0
- options.merge({ :class => "#{dom_class(record)} #{options[:class]}".strip, :id => dom_id(record, prefix) })),
0
- block.binding
0
+ options.merge({ :class => "#{dom_class(record)} #{options[:class]}".strip, :id => dom_id(record, prefix) }))
0
       end
0
     end
0
   end
0
-end
0
\ No newline at end of file
0
+end
...
66
67
68
69
70
71
 
72
73
74
 
75
76
77
...
66
67
68
 
 
 
69
70
 
 
71
72
73
74
0
@@ -66,12 +66,9 @@ module ActionView
0
       def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
0
         if block_given?
0
           options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
0
- content = capture(&block)
0
- content_tag = content_tag_string(name, content, options, escape)
0
- block_is_within_action_view?(block) ? concat(content_tag, block.binding) : content_tag
0
+ concat(content_tag_string(name, capture(&block), options, escape))
0
         else
0
- content = content_or_options_with_block
0
- content_tag_string(name, content, options, escape)
0
+ content_tag_string(name, content_or_options_with_block, options, escape)
0
         end
0
       end
0
 
...
15
16
17
18
 
19
20
21
22
 
23
24
 
25
26
27
28
 
29
30
31
...
15
16
17
 
18
19
20
21
 
22
23
 
24
25
26
27
 
28
29
30
31
0
@@ -15,17 +15,17 @@ module ActionView
0
       #
0
       # ==== Examples
0
       # <%
0
- # concat "hello", binding
0
+ # concat "hello"
0
       # # is the equivalent of <%= "hello" %>
0
       #
0
       # if (logged_in == true):
0
- # concat "Logged in!", binding
0
+ # concat "Logged in!"
0
       # else
0
- # concat link_to('login', :action => login), binding
0
+ # concat link_to('login', :action => login)
0
       # end
0
       # # will either display "Logged in!" or a login link
0
       # %>
0
- def concat(string, binding = nil)
0
+ def concat(string)
0
         if @output_buffer
0
           @output_buffer << string
0
         else

Comments

    No one has commented yet.