Permalink
Browse files

Apply [8810], [8811], [8812], and [8813] to 2.0 stable

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/2-0-stable@8814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 2a07886 commit 569a78cbe018741abcff549b6a35ed688ece2d68 @technoweenie technoweenie committed Feb 7, 2008
@@ -1,5 +1,11 @@
*SVN*
+* Remove ERB trim variables from trace template in case ActionView::Base.erb_trim_mode is changed in the application. #10098 [tpope, kampers]
+
+* Fix typo in form_helper documentation. #10650 [xaviershay, kampers]
+
+* Fix bug with setting Request#format= after the getter has cached the value. #10889 [cch1]
+
* TestSession supports indifferent access. #7372 [tamc, Arsen7, mhackett, julik, jean.helou]
* UrlWriter respects relative_url_root. #10748 [Cheah Chu Yeow]
@@ -111,7 +111,7 @@ def format
# end
def format=(extension)
parameters[:format] = extension.to_s
- format
+ @format = Mime::Type.lookup_by_extension(parameters[:format])
end
# Returns true if the request's "X-Requested-With" header contains
@@ -10,17 +10,17 @@
<p><code>RAILS_ROOT: <%= defined?(RAILS_ROOT) ? RAILS_ROOT : "unset" %></code></p>
<div id="traces">
- <% names.each do |name| -%>
+ <% names.each do |name| %>
<%
show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';"
hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"}
%>
<a href="#" onclick="<%= hide %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %>
- <% end -%>
+ <% end %>
- <% traces.each do |name, trace| -%>
+ <% traces.each do |name, trace| %>
<div id="<%= name.gsub /\s/, '-' %>" style="display: <%= name == "Application Trace" ? 'block' : 'none' %>;">
<pre><code><%= trace.join "\n" %></code></pre>
</div>
- <% end -%>
-</div>
+ <% end %>
+</div>
@@ -157,7 +157,7 @@ module FormHelper
#
# def labelled_form_for(record_or_name_or_array, *args, &proc)
# options = args.extract_options!
- # form_for(record_or_name_or_array, *(args << options.merge(:builder => LabellingFormBuiler)), &proc)
+ # form_for(record_or_name_or_array, *(args << options.merge(:builder => LabellingFormBuilder)), &proc)
# end
#
# If you don't need to attach a form to a model instance, then check out FormTagHelper#form_tag.
@@ -371,6 +371,13 @@ def test_content_type
assert_equal Mime::HTML, @request.content_type
end
+ def test_format_assignment_should_set_format
+ @request.instance_eval { self.format = :txt }
+ assert !@request.format.xml?
+ @request.instance_eval { self.format = :xml }
+ assert @request.format.xml?
+ end
+
def test_content_no_type
assert_equal nil, @request.content_type
end
@@ -1,5 +1,7 @@
*SVN*
+* Remove :nodoc: entries around the ActiveSupport test/unit assertions. #10946 [dancroak, jamesh]
+
* Fixed String#titleize to work for strings with 's too #10571 [trek]
* Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [DHH/Marcel]
@@ -1,7 +1,9 @@
-module Test #:nodoc:
- module Unit #:nodoc:
+module Test
+ module Unit
+ #--
# FIXME: no Proc#binding in Ruby 2, must change this API
- module Assertions #:nodoc:
+ #++
+ module Assertions
# Test numeric difference between the return value of an expression as a result of what is evaluated
# in the yielded block.
#

0 comments on commit 569a78c

Please sign in to comment.