Sha256: ce3e5770555994c49c8dd22d0b4fbaa097e089698f8ae799ddfb0e63b2376a73

Contents?: true

Size: 867 Bytes

Versions: 15

Compression:

Stored size: 867 Bytes

Contents

xml.instruct! :xml, :version => "1.0"
xml.rss(:version => "2.0" ){
  xml.channel{
    xml.title("Feeds from admin_data #{@klass.name}")
    xml.link(request.host_with_port)
    xml.description("feeds from AdminData #{@klass.name}")
    xml.language('en-us')
    h = {:order => "#{@klass.primary_key} desc", :limit => 100}
    @klass.find(:all, h).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)
        xml.pubDate(record.created_at.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

15 entries across 15 versions & 1 rubygems

Version Path
admin_data-1.0.14 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.13 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.12 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.11 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.10 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.9 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.8 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.7 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.6 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.5 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.4 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.3 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.2 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.1 app/views/admin_data/feed/index.rss.builder
admin_data-1.0.0 app/views/admin_data/feed/index.rss.builder