Sha256: f207c3db9fca0c2c6b8eaba12af6e1897df95d1c2635c1af6bfc1af162f19b9c

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

module RailsConnector
  #
  # This class provides a default controller implementation for rendering an RSS feed.
  # It should be customized by subclassing.
  #
  # The RSS feature assumes that you have a root object specified whose direct children will be used as feed entries.
  #
  # Specify the RSS root in
  # <code><em>RAILS_ROOT</em>/config/initializers/rails_connector.rb</code>:
  #   RailsConnector::Configuration::Rss.root = lambda { NamedLink.get_object('news') }
  class DefaultRssController < DefaultCmsController
    #
    # This action renders the built-in RSS feed.
    #
    # To customize feed's layout, override either this method, or the apropriate view.
    #
    # @return [void]
    def index
      respond_to do |format|
        format.rss
      end
    end

    protected

    def load_object
      @obj = Configuration::Rss.root
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
infopark_rails_connector-6.9.1.3.22208381 app/controllers/rails_connector/default_rss_controller.rb
infopark_rails_connector-6.9.0.3.197272233 app/controllers/rails_connector/default_rss_controller.rb