Permalink
Browse files

Skip home page if already logged in

  • Loading branch information...
1 parent 80e87a1 commit 46af8592da77d7d29cba8def0664c9d09d1f058e @rwdaigle committed Oct 10, 2012
Showing with 11 additions and 4 deletions.
  1. +9 −0 app/controllers/homes_controller.rb
  2. +2 −4 app/views/homes/index.html.haml
@@ -1,2 +1,11 @@
class HomesController < ApplicationController
+
+ before_filter :skip_if_logged_in, :only => :index
+
+ private
+
+ def skip_if_logged_in
+ redirect_to search_gists_path if user_logged_in?
+ end
+
end
@@ -1,6 +1,4 @@
%h4 Hi there
-%p Gisted lets you quickly get to your gists via search. You will need to log into GitHub via OAuth first.
+%p Gisted lets you quickly search and access your gists. You will need to log into GitHub via OAuth first.
-%p= link_to "Search my gists", search_gists_path
-%p= link_to "Login", login_path
-%p= link_to "Logout", logout_path
+%p= link_to "Login & search my gists", search_gists_path

0 comments on commit 46af859

Please sign in to comment.