Use forms as homepage if logged in
This commit is contained in:
parent
cb060238e8
commit
6c27a471ee
@ -7,4 +7,8 @@ class ApplicationController < ActionController::Base
|
||||
def current_user
|
||||
session[:user_id] && User.find_by(id: session[:user_id])
|
||||
end
|
||||
|
||||
def logged_in?
|
||||
current_user.present?
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,6 @@
|
||||
class HomeController < ApplicationController
|
||||
|
||||
def index; end
|
||||
def index
|
||||
redirect_to forms_url if logged_in?
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user