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

Ticket #8518: partial_object_documentation.diff

File partial_object_documentation.diff, 0.8 kB (added by Catfish, 2 years ago)
  • actionpack/lib/action_controller/base.rb

    old new  
    642642      #   # Renders the same partial with a local variable. 
    643643      #   render :partial => "person", :locals => { :name => "david" } 
    644644      # 
     645      #   # Renders the partial, making @new_person available through 
     646      #   # the local variable 'person' 
     647      #   render :partial => "person", :object => @new_person 
     648      # 
    645649      #   # Renders a collection of the same partial by making each element 
    646650      #   # of @winners available through the local variable "person" as it 
    647651      #   # builds the complete response.