Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add default redirect to / if none given

  • Loading branch information...
commit a9c7de40d00c4fa3f0882a70b72f897e73e24846 1 parent abf11fe
@lukebaker lukebaker authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  app/controllers/home_controller.rb
View
3  app/controllers/home_controller.rb
@@ -5,7 +5,8 @@ class HomeController < ApplicationController
before_filter :admin_only, :only => [:no_google_tracking]
def redirect
- redirect_to(params[:redirect_to])
+ location = params[:redirect_to] || '/'
+ redirect_to(location)
end
def index
Please sign in to comment.
Something went wrong with that request. Please try again.