whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [2/2] Commit 3678875: cleanup redirect
Date Sun, 06 Mar 2016 19:24:10 GMT
Commit 3678875e0f8312263b2904f4c630f4b700a31dc8:
    cleanup redirect


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/board/agenda/routes.rb                                   | + --
------------------------------------------------------------
3 changes: 1 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/board/agenda/routes.rb b/www/board/agenda/routes.rb
index 8130cc0..5ecca68 100755
--- a/www/board/agenda/routes.rb
+++ b/www/board/agenda/routes.rb
@@ -14,8 +14,7 @@
 # redirect root to latest agenda
 get '/' do
   agenda = dir('board_agenda_*.txt').sort.last
-  response.headers['Location'] = "#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/"
-  status 302
+  redirect to("/#{agenda[/\d+_\d+_\d+/].gsub('_', '-')}/")
 end
 
 # redirect missing to missing page for the latest agenda

Mime
View raw message