Sha256: 3e1be9fdfd68674aa1ce7b7655e1bec193625863d471d37e876a7f5126e8172c

Contents?: true

Size: 816 Bytes

Versions: 21

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

class AuthorsController < ContentController
  layout :theme_layout

  def show
    @author = User.find_by(login: params[:id])
    raise ActiveRecord::RecordNotFound unless @author

    @articles = @author.articles.published.page(params[:page]).
      per(this_blog.per_page(params[:format]))
    @page_title = this_blog.author_title_template.to_title(@author, this_blog, params)
    @keywords = this_blog.meta_keywords
    @description = this_blog.author_desc_template.to_title(@author, this_blog, params)

    auto_discovery_feed(only_path: false)

    respond_to do |format|
      format.rss { render_feed "rss" }
      format.atom { render_feed "atom" }
      format.html
    end
  end

  private

  def render_feed(format)
    render "show_#{format}_feed", layout: false
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

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