archives: fix for title being set before not found check

This commit is contained in:
Kyle Drake 2017-07-23 14:21:30 -07:00
parent fcb2da9166
commit 99cd5d1ab8

View file

@ -39,11 +39,9 @@ end
get '/site/:username/archives' do
@site = Site[username: params[:username]]
@title = "Site archives for #{@site.title}"
not_found if @site.nil? || @site.archiving_disabled
@title = "Site archives for #{@site.title}"
@archives = @site.archives_dataset.limit(300).order(:updated_at.desc).all
erb :'site/archives'
end