Skip to content

Commit 106ff8f

Browse files
committed
Merge branch 'master' of git://github.com/rails/rails
2 parents 6abeba5 + 0e9efae commit 106ff8f

File tree

7 files changed

+31
-2
lines changed

7 files changed

+31
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The correct item.erb was loaded.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is an editor backup file and should never be loaded!

actionpack/test/template/render_test.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ def test_render_utf8_template
255255
assert_equal Encoding::UTF_8, result.encoding
256256
end
257257
end
258+
259+
def test_render_with_backup_files
260+
result = @view.render :file => "/test/backup_files/item"
261+
assert_equal "The correct item.erb was loaded.\n", result
262+
end
263+
258264
end
259265

260266
module TemplatesSetupTeardown

actionpack/test/template/template_test.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def test_template_path_parsing
1919
t.assert_parses_template_path 'abc', :extension => nil, :format => nil, :name => nil
2020
t.assert_parses_template_path 'abc.xxx', :extension => nil, :format => 'xxx', :name => 'abc'
2121
t.assert_parses_template_path 'abc.html.xxx', :extension => nil, :format => 'xxx', :name => 'abc'
22+
23+
t.assert_parses_template_path 'abc.html.erb.orig', :format => 'orig', :extension => nil
2224
end
2325
end
2426

activesupport/lib/active_support/cache/strategy/local_cache.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def call(env)
2727
Thread.current[:#{thread_local_key}] = nil
2828
end
2929
EOS
30+
31+
def klass.to_s
32+
"ActiveSupport::Cache::Strategy::LocalCache"
33+
end
34+
3035
klass
3136
end
3237
end

railties/builtin/rails_info/rails/info.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def to_html
5656
returning table = '<table>' do
5757
properties.each do |(name, value)|
5858
table << %(<tr><td class="name">#{CGI.escapeHTML(name.to_s)}</td>)
59-
table << %(<td class="value">#{CGI.escapeHTML(value.to_s)}</td></tr>)
59+
formatted_value = if value.kind_of?(Array)
60+
"<ul>" + value.map { |v| "<li>#{CGI.escapeHTML(v.to_s)}</li>" }.join + "</ul>"
61+
else
62+
CGI.escapeHTML(value.to_s)
63+
end
64+
table << %(<td class="value">#{formatted_value}</td></tr>)
6065
end
6166
table << '</table>'
6267
end
@@ -102,6 +107,10 @@ def git_info
102107
end
103108
end
104109

110+
property 'Middleware' do
111+
ActionController::Dispatcher.middleware.active.map(&:inspect)
112+
end
113+
105114
# The Rails Git revision, if it's checked out into vendor/rails.
106115
property 'Edge Rails revision' do
107116
edge_rails_revision

railties/html/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@
9999
}
100100
#about-content td.name {color: #555}
101101
#about-content td.value {color: #000}
102-
102+
103+
#about-content ul {
104+
padding: 0;
105+
list-style-type: none;
106+
}
107+
103108
#about-content.failure {
104109
background-color: #fcc;
105110
border: 1px solid #f00;

0 commit comments

Comments
 (0)