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

Changeset 6920

Show
Ignore:
Timestamp:
06/01/07 03:53:39 (1 year ago)
Author:
bitsweat
Message:

render :partial recognizes Active Record associations as Arrays. Closes #8538.

Files:

Legend:

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

    r6888 r6920  
    11*SVN* 
     2 
     3* render :partial recognizes Active Record associations as Arrays.  #8538 [kamal] 
    24 
    35* Routing: drop semicolon and comma as route separators.  [Jeremy Kemper] 
  • trunk/actionpack/lib/action_view/partials.rb

    r6751 r6920  
    6565            render("#{path}/_#{partial_name}", local_assigns) 
    6666          end 
    67         when Array 
     67        when Array, ActiveRecord::Associations::AssociationCollection 
    6868          if partial_path.any? 
    6969            path       = ActionController::RecordIdentifier.partial_path(partial_path.first) 
  • trunk/actionpack/test/fixtures/topic.rb

    r5160 r6920  
    11class Topic < ActiveRecord::Base 
    2   has_many :replies, :include => [:user], :dependent => :destroy 
     2  has_many :replies, :dependent => :destroy 
    33end