class PublicationsController < ApplicationController def show @publication = Publication.matching_slug(params[:publication_slug]).first @contents = @publication.managed_contents.sort{|a,b| a.headline <=> b.headline} @contents.sort!{|a,b| a.position.to_i <=> b.position.to_i} if @publication.has_faqs? respond_to do |format| format.html format.rss { render :xml } end end def feed @publication = Publication.matching_slug(params[:publication_slug]).first @contents = @publication.managed_contents.published.sort{|a,b| a.headline <=> b.headline} @contents.sort!{|a,b| a.position.to_i <=> b.position.to_i} if @publication.has_faqs? end end