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

Changeset 6465

Show
Ignore:
Timestamp:
03/26/07 19:02:19 (2 years ago)
Author:
minam
Message:

Make sure the expiry hash is built by comparing the to_param-ized values of each hash

Files:

Legend:

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

    r6453 r6465  
    11*SVN* 
     2 
     3* Make sure the route expiry hash is constructed by comparing the to_param-ized values of each hash. [Jamis Buck] 
    24 
    35* Allow configuration of the default action cache path for #caches_action calls.  [Rick Olson] 
  • trunk/actionpack/lib/action_controller/routing.rb

    r6343 r6465  
    11961196      def build_expiry(options, recall) 
    11971197        recall.inject({}) do |expiry, (key, recalled_value)| 
    1198           expiry[key] = (options.key?(key) && options[key] != recalled_value
     1198          expiry[key] = (options.key?(key) && options[key].to_param != recalled_value.to_param
    11991199          expiry 
    12001200        end 
  • trunk/actionpack/test/controller/routing_test.rb

    r6343 r6465  
    17941794    ) 
    17951795  end 
    1796    
     1796 
     1797  def test_expiry_determination_should_consider_values_with_to_param 
     1798    set.draw { |map| map.connect 'projects/:project_id/:controller/:action' } 
     1799    assert_equal '/projects/1/post/show', set.generate( 
     1800      {:action => 'show', :project_id => 1}, 
     1801      {:controller => 'post', :action => 'show', :project_id => '1'}) 
     1802  end 
     1803 
    17971804  def test_generate_all 
    17981805    set.draw do |map|