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

Changeset 6873

Show
Ignore:
Timestamp:
05/27/07 22:45:30 (2 years ago)
Author:
david
Message:

Yield the block

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/atom_feed_helper/lib/atom_feed_helper.rb

    r6835 r6873  
    3131        @xml.entry do  
    3232          @xml.id("tag:#{@view.request.host_with_port},#{record.created_at.xmlschema}:#{record.class}#{record.id}") 
    33           @xml.published(record.created_at.xmlschema) if record.respond_to?(:created_at) 
    34           @xml.updated(record.updated_at.xmlschema)   if record.respond_to?(:updated_at) 
    35           @xml.link(:rel => 'alternate', :type => 'text/html', :href => @view.polymorphic_url(record)) 
     33          @xml.published(record.created_at.xmlschema) 
     34          @xml.updated(record.updated_at.xmlschema) if record.respond_to?(:updated_at) 
    3635 
    3736          yield @xml 
     37 
     38          @xml.link(:rel => 'alternate', :type => 'text/html', :href => @view.polymorphic_url(record)) 
    3839        end 
    3940      end 
    4041 
    4142      private 
    42         def method_missing(method, *arguments
    43           @xml.__send__(method, *arguments
     43        def method_missing(method, *arguments, &block
     44          @xml.__send__(method, *arguments, &block
    4445        end 
    4546    end