Sha256: 634e50cd6527375f285f0f1a703961e496c5107eec41947c3d98c5e4ecfd9abd

Contents?: true

Size: 664 Bytes

Versions: 24

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

class ContentController < BaseController
  private

  # TODO: Make this work for all content.
  def auto_discovery_feed(options = {})
    with_options(options.reverse_merge(only_path: true)) do |opts|
      @auto_discovery_url_rss = opts.url_for(format: "rss", only_path: false)
      @auto_discovery_url_atom = opts.url_for(format: "atom", only_path: false)
    end
  end

  def theme_layout
    this_blog.current_theme.layout(action_name)
  end

  def render_cached_xml(template, object)
    feed = cache([controller_name, template, object]) do
      render_to_string template, layout: false
    end
    render xml: feed
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
publify_core-10.0.2 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.5.0 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.4.0 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.3.0 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.2.0 app/controllers/content_controller.rb
publify_core-10.0.1 app/controllers/content_controller.rb
publify_core-10.0.0 app/controllers/content_controller.rb
publify_core-9.2.10 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.1.1 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.1.0 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.0.3 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.0.2 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.0.1 app/controllers/content_controller.rb
HornsAndHooves-publify_core-10.0.0 app/controllers/content_controller.rb
publify_core-9.2.9 app/controllers/content_controller.rb
publify_core-9.2.8 app/controllers/content_controller.rb
publify_core-9.2.7 app/controllers/content_controller.rb
publify_core-9.2.6 app/controllers/content_controller.rb
publify_core-9.2.5 app/controllers/content_controller.rb
publify_core-9.2.4 app/controllers/content_controller.rb