Sha256: d8d1ae164d05671a6638a8326cd91fb08ca5c8a5c25dc196f27b2588f6f32ff7

Contents?: true

Size: 858 Bytes

Versions: 12

Compression:

Stored size: 858 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_on_k_path(:id => record, :klass => @klass.name))
        xml.guid(admin_data_on_k_path(:id => record, :klass => @klass.name))
      end
    end
  }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
admin_data-1.1.8 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.7 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.6 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.5 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.4 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.3 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.2 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.1 app/views/admin_data/feed/index.rss.builder
admin_data-1.1.0 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.22 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.21 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.19 app/views/admin_data/feed/index.rss.builder