Sha256: 2dbfa5142e1f1b463b6149de8d462984cb9a7e4db7ad231555aef3ba8da8cddd

Contents?: true

Size: 981 Bytes

Versions: 22

Compression:

Stored size: 981 Bytes

Contents

# http://cyber.law.harvard.edu/rss/rss.html
item   = @items.singularize

if item == 'task'
  @assets = @assets.values.flatten
  title  = t(:"#{@view}_tab") << ' ' << t(@items.to_sym)
end

xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
  xml.channel do
    xml.generator  "Fat Free CRM v#{FatFreeCRM::VERSION::STRING}"
    xml.link       send(:"#{@items}_url")
    xml.pubDate    Time.now.to_s(:rfc822)
    xml.title      title || t(@items.to_sym)

    @assets.each do |asset|
      xml.item do
        url = send(:"#{item}_url", asset)
        xml.author      !asset.is_a?(User) ? asset.try(:user).try(:full_name) : asset.full_name
        xml.description send(:"#{item}_summary", asset) if respond_to?(:"#{item}_summary")
        xml.guid        url
        xml.link        url
        xml.pubDate     asset.created_at.to_s(:rfc822)
        xml.title       !asset.is_a?(User) ? asset.name : "#{asset.full_name} (#{asset.username})"
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/views/application/show.rss.builder
fat_free_crm-0.15.2 app/views/application/show.rss.builder
fat_free_crm-0.14.1 app/views/application/show.rss.builder
fat_free_crm-0.15.1 app/views/application/show.rss.builder
fat_free_crm-0.15.0 app/views/application/show.rss.builder
fat_free_crm-0.15.0.beta.2 app/views/application/show.rss.builder
fat_free_crm-0.15.0.beta app/views/application/show.rss.builder
fat_free_crm-0.14.0 app/views/application/show.rss.builder
reduced_fat_crm-0.15.0.beta app/views/application/show.rss.builder
reduced_fat_crm-0.14.0 app/views/application/show.rss.builder
fat_free_crm-0.13.6 app/views/application/show.rss.builder
fat_free_crm-0.13.5 app/views/application/show.rss.builder
fat_free_crm-0.13.4 app/views/application/show.rss.builder
fat_free_crm-0.13.3 app/views/application/show.rss.builder
fat_free_crm-0.13.2 app/views/application/show.rss.builder
fat_free_crm-0.12.3 app/views/application/show.rss.builder
fat_free_crm-0.12.2 app/views/application/show.rss.builder
fat_free_crm-0.13.1 app/views/application/show.rss.builder
fat_free_crm-0.12.1 app/views/application/show.rss.builder
fat_free_crm-0.13.0 app/views/application/show.rss.builder