Sha256: dcf82b23992070f1aeea9492a2aab9b203740849f61cc91f1ebf0a9c38fbe03f

Contents?: true

Size: 572 Bytes

Versions: 16

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

module PagesCore
  module RssController
    extend ActiveSupport::Concern

    private

    def all_feed_items
      feeds = Page.enabled_feeds(locale, include_hidden: true)
      Page.where(parent_page_id: feeds)
          .order("published_at DESC")
          .published
          .limit(20)
          .localized(locale)
    end

    def render_rss(items, title: nil)
      @title = PagesCore.config.site_name
      @title += ": #{title}" if title
      @items = items
      render template: "feeds/pages", layout: false
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pages_core-3.12.1 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.12.0 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.11.3 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.11.2 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.11.1 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.11.0 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.10.2 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.10.1 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.9.2 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.9.1 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.9.0 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.8.3 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.8.2 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.8.1 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.8.0 app/controllers/concerns/pages_core/rss_controller.rb
pages_core-3.7.0 app/controllers/concerns/pages_core/rss_controller.rb