Sha256: 369deb057cef24bfb3f7f38515af19a675b711eafc50807faaca9e91b0c38b7a

Contents?: true

Size: 846 Bytes

Versions: 11

Compression:

Stored size: 846 Bytes

Contents

xml.instruct! :xml, :version => "1.0"
xml.rss(:version => "2.0" ){
  xml.channel{
    xml.title(@title)
    xml.link(request.host_with_port)
    xml.description(@description)
    xml.language('en-us')
    h = {:order => "#{@klass.primary_key} desc", :limit => 100}
    @records.each do |record|
      xml.item do
        xml.title("#{@klasss} id: #{record.id}")

        desc = AdminData::Util.label_values_pair_for(record, self).inject([]) do |sum, a|
          sum << "<p>#{a[0]}: #{a[1]}</p>"
        end.join

        xml.description(desc)
        d = record.respond_to?(:created_at) ?  record.created_at : Time.now
        xml.pubDate(d.strftime("%a, %d %b %Y %H:%M:%S %z"))
        xml.link(admin_data_url(:id => record, :klass => @klass.name))
        xml.guid(admin_data_url(:id => record, :klass => @klass.name))
      end
    end
  }
}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
the_jobbook_admin_data-1.3.0a app/views/admin_data/feed/index.rss.builder
admin_data-1.2.1 app/views/admin_data/feed/index.rss.builder
admin_data-1.2.0 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.16 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.15 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.14 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.13 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.12 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.11 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.10 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.9 app/views/admin_data/feed/index.rss.builder