Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7346

Show
Ignore:
Timestamp:
08/20/07 01:12:43 (1 year ago)
Author:
rick
Message:

Fix bug where action caching sets the content type to the ActionCachePath object. Closes #9282 [mindforge]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r7321 r7346  
    11*SVN* 
     2 
     3* Fix bug where action caching sets the content type to the ActionCachePath object.  Closes #9282 [mindforge] 
    24 
    35* Find layouts even if they're not in the first view_paths directory.  Closes #9258 [caio] 
  • trunk/actionpack/lib/action_controller/caching.rb

    r7220 r7346  
    232232          if cache = controller.read_fragment(cache_path.path) 
    233233            controller.rendered_action_cache = true 
    234             set_content_type!(controller, cache_path
     234            set_content_type!(controller, cache_path.extension
    235235            controller.send(:render_text, cache) 
    236236            false 
  • trunk/actionpack/test/controller/caching_test.rb

    r6970 r7346  
    280280    assert_equal 'example.org/posts/index.xml', path_object.path 
    281281  end 
     282   
     283  def test_correct_content_type_is_returned_for_cache_hit 
     284    get :index, :id => 'content-type.xml' 
     285    assert_equal 'application/xml', @response.content_type 
     286  end 
    282287 
    283288  def test_empty_path_is_normalized