Sha256: 9784f7a696e57c219c4bcaf41f879a8c7d1a3c5b488afc220b3c094539a96b9f

Contents?: true

Size: 778 Bytes

Versions: 9

Compression:

Stored size: 778 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
publify_core-9.1.0 app/controllers/authors_controller.rb
publify_core-9.0.1 app/controllers/authors_controller.rb
publify_core-9.0.0 app/controllers/authors_controller.rb
publify_core-9.0.0.pre6 app/controllers/authors_controller.rb
publify_core-9.0.0.pre5 app/controllers/authors_controller.rb
publify_core-9.0.0.pre4 app/controllers/authors_controller.rb
publify_core-9.0.0.pre3 app/controllers/authors_controller.rb
publify_core-9.0.0.pre2 app/controllers/authors_controller.rb
publify_core-9.0.0.pre1 app/controllers/authors_controller.rb